Updated installer to get rid of "parameters.nsh", now using StdUtils plug-in to get the parameters.

This commit is contained in:
LoRd_MuldeR 2011-10-08 18:20:20 +02:00
parent 9d652fb2e0
commit ad94a4726b
7 changed files with 13 additions and 28 deletions

View File

@ -76,11 +76,6 @@
!include `MUI2.nsh`
!include `WinVer.nsh`
!include `StdUtils.nsh`
!include `parameters.nsh`
;Uninstaller
!define __PREFIX__ "un."
!include `parameters.nsh`
;--------------------------------
@ -272,7 +267,7 @@ Function .onInit
Quit
${EndIf}
!insertmacro GetCommandlineParameter "Update" "?" $R0
${StdUtils.GetParameter} $R0 "Update" "?"
${If} "$R0" == "?"
!insertmacro MUI_LANGDLL_DISPLAY
${EndIf}
@ -285,7 +280,7 @@ Function .onInit
${EndIf}
${If} ${AtMostWinNT4}
!insertmacro GetCommandlineParameter "Update" "?" $R0
${StdUtils.GetParameter} $R0 "Update" "?"
${If} $R0 == "?"
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, your platform is not supported anymore. Installation aborted!$\nThe minimum required platform is Windows 2000."
${Else}
@ -319,7 +314,7 @@ Function un.onInit
Quit
${EndIf}
!insertmacro un.GetCommandlineParameter "Force" "?" $R0
${StdUtils.GetParameter} $R0 "Force" "?"
${If} "$R0" == "?"
!insertmacro MUI_LANGDLL_DISPLAY
${EndIf}
@ -425,8 +420,7 @@ Function _TrimStr
FunctionEnd
!macro GetExecutableName OutVar
!insertmacro GetCommandlineParameter "Update" "LameXP.exe" ${OutVar}
!insertmacro TrimStr ${OutVar}
${StdUtils.GetParameter} ${OutVar} "Update" ""
StrCmp ${OutVar} "" 0 +2
StrCpy ${OutVar} "LameXP.exe"
!macroend
@ -570,22 +564,13 @@ SectionEnd
;--------------------------------
Function CheckForUpdate
!insertmacro GetCommandlineParameter "Update" "?" $R0
${StdUtils.GetParameter} $R0 "Update" "?"
${IfNotThen} "$R0" == "?" ${|} Goto EnableUpdateMode ${|}
${IfThen} "$INSTDIR" == "" ${|} Return ${|}
${IfThen} "$INSTDIR" == "$EXEDIR" ${|} Return ${|}
${IfNotThen} ${FileExists} "$INSTDIR\LameXP.exe" ${|} Return ${|}
;StrCmp "$INSTDIR" "" 0 +2
;Return
;IfFileExists "$INSTDIR\*.*" +2
;Return
;StrCmp "$EXEDIR" "$INSTDIR" 0 +2
;Return
;IfFileExists "$INSTDIR\LameXP.exe" +2
;Return
EnableUpdateMode:
FindWindow $R0 "#32770" "" $HWNDPARENT
@ -598,7 +583,7 @@ Function CheckForUpdate
FunctionEnd
Function un.CheckForcedUninstall
!insertmacro un.GetCommandlineParameter "Force" "?" $R0
${StdUtils.GetParameter} $R0 "Force" "?"
${IfNotThen} "$R0" == "?" ${|} Abort ${|}
FunctionEnd
@ -609,7 +594,7 @@ FunctionEnd
Function CheckForPreRelease
!ifdef LAMEXP_IS_PRERELEASE
!insertmacro GetCommandlineParameter "Update" "?" $R0
${StdUtils.GetParameter} $R0 "Update" "?"
StrCmp $R0 "?" 0 SkipPrereleaseWarning
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
Quit

View File

@ -59,7 +59,7 @@
;Includes
;--------------------------------
!include `parameters.nsh`
!include `StdUtils.nsh`
;--------------------------------
@ -141,7 +141,7 @@ Section "-LaunchTheInstaller"
; --------
StrCpy $R9 ""
!insertmacro GetCommandlineParameter "Update" "?" $R0
${StdUtils.GetParameter} $R0 "Update" "?"
StrCmp "$R0" "?" +5
StrCmp "$R0" "" 0 +3

Binary file not shown.

Binary file not shown.

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 717
#define VER_LAMEXP_BUILD 721
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -67,7 +67,7 @@ g_lamexp_tools[] =
{"29da0d3e810bc3e8d2cddb3db452325eefca0d0c1fff1379fa17806ad447752be1b88e2f", CPU_TYPE_X64_GEN, "aften.x64.exe", 8},
{"1cca303fabd889a18fc01c32a7fd861194cfcac60ba63740ea2d7c55d049dbf8f59259fa", CPU_TYPE_ALL_ALL, "alac.exe", 20},
{"6d22d4bbd7ce2162e38f70ac9187bc84eb28233b36ee6c0492d0a6195318782d7f05c444", CPU_TYPE_ALL_ALL, "avs2wav.exe", 13},
{"9b9cd7b7ee180ed9eec1ff61584b4c6a941e72e928140e1cada124bd5974b2a38bfe469e", CPU_TYPE_ALL_ALL, "elevator.exe", UINT_MAX},
{"923ee30219d93e2bf0b96b4498da92a71ae6ef041bcea960f27e5bf5ace3fdab658efdb8", CPU_TYPE_ALL_ALL, "elevator.exe", UINT_MAX},
{"9ae98a3fc779f69ee876a3b477fbc35a709ba5066823b2eb62eeb015057c38807e4be51f", CPU_TYPE_ALL_ALL, "faad.exe", 27},
{"446054f9a7f705f1aadc9053ca7b8a86a775499ef159978954ebdea92de056c34f8841f7", CPU_TYPE_ALL_ALL, "flac.exe", 121},
{"dd68d074c5e13a607580f3a24595c0f3882e37211d2ca628f46e6df20fabcc832dad488a", CPU_TYPE_ALL_ALL, "gpgv.exe", 1411},
@ -90,7 +90,7 @@ g_lamexp_tools[] =
{"875871c942846f6ad163f9e4949bba2f4331bec678ca5aefe58c961b6825bd0d419a078b", CPU_TYPE_ALL_ALL, "valdec.exe", 31},
{"e657331e281840878a37eb4fb357cb79f33d528ddbd5f9b2e2f7d2194bed4720e1af8eaf", CPU_TYPE_ALL_ALL, "wget.exe", 1114},
{"8923cf65e181f8a99f28e9d1ea0d89ace02142241a7f76dae3d540ffd0790495af815644", CPU_TYPE_ALL_ALL, "wma2wav.exe", 20111001},
{"44a80977bfa84938a3584423cd5eb0716c0fded456b493bed0b1cf78f7579106365d4c89", CPU_TYPE_ALL_ALL, "wupdate.exe", 20111002},
{"b129eac3fb1fefe01044f285f4e1851ec2986ad33ad1841ad00760cd8b91070fe8aa6785", CPU_TYPE_ALL_ALL, "wupdate.exe", 20111008},
{"6b053b37d47a9c8659ebf2de43ad19dcba17b9cd868b26974b9cc8c27b6167e8bf07a5a2", CPU_TYPE_ALL_ALL, "wvunpack.exe", 4601},
{NULL, NULL, NULL, NULL}
};