Updated installer to get rid of "parameters.nsh", now using StdUtils plug-in to get the parameters.
This commit is contained in:
parent
9d652fb2e0
commit
ad94a4726b
@ -76,11 +76,6 @@
|
|||||||
!include `MUI2.nsh`
|
!include `MUI2.nsh`
|
||||||
!include `WinVer.nsh`
|
!include `WinVer.nsh`
|
||||||
!include `StdUtils.nsh`
|
!include `StdUtils.nsh`
|
||||||
!include `parameters.nsh`
|
|
||||||
|
|
||||||
;Uninstaller
|
|
||||||
!define __PREFIX__ "un."
|
|
||||||
!include `parameters.nsh`
|
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
@ -272,7 +267,7 @@ Function .onInit
|
|||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
!insertmacro GetCommandlineParameter "Update" "?" $R0
|
${StdUtils.GetParameter} $R0 "Update" "?"
|
||||||
${If} "$R0" == "?"
|
${If} "$R0" == "?"
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
${EndIf}
|
${EndIf}
|
||||||
@ -285,7 +280,7 @@ Function .onInit
|
|||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} ${AtMostWinNT4}
|
${If} ${AtMostWinNT4}
|
||||||
!insertmacro GetCommandlineParameter "Update" "?" $R0
|
${StdUtils.GetParameter} $R0 "Update" "?"
|
||||||
${If} $R0 == "?"
|
${If} $R0 == "?"
|
||||||
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, your platform is not supported anymore. Installation aborted!$\nThe minimum required platform is Windows 2000."
|
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, your platform is not supported anymore. Installation aborted!$\nThe minimum required platform is Windows 2000."
|
||||||
${Else}
|
${Else}
|
||||||
@ -319,7 +314,7 @@ Function un.onInit
|
|||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
!insertmacro un.GetCommandlineParameter "Force" "?" $R0
|
${StdUtils.GetParameter} $R0 "Force" "?"
|
||||||
${If} "$R0" == "?"
|
${If} "$R0" == "?"
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
${EndIf}
|
${EndIf}
|
||||||
@ -425,8 +420,7 @@ Function _TrimStr
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
!macro GetExecutableName OutVar
|
!macro GetExecutableName OutVar
|
||||||
!insertmacro GetCommandlineParameter "Update" "LameXP.exe" ${OutVar}
|
${StdUtils.GetParameter} ${OutVar} "Update" ""
|
||||||
!insertmacro TrimStr ${OutVar}
|
|
||||||
StrCmp ${OutVar} "" 0 +2
|
StrCmp ${OutVar} "" 0 +2
|
||||||
StrCpy ${OutVar} "LameXP.exe"
|
StrCpy ${OutVar} "LameXP.exe"
|
||||||
!macroend
|
!macroend
|
||||||
@ -570,22 +564,13 @@ SectionEnd
|
|||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
Function CheckForUpdate
|
Function CheckForUpdate
|
||||||
!insertmacro GetCommandlineParameter "Update" "?" $R0
|
${StdUtils.GetParameter} $R0 "Update" "?"
|
||||||
${IfNotThen} "$R0" == "?" ${|} Goto EnableUpdateMode ${|}
|
${IfNotThen} "$R0" == "?" ${|} Goto EnableUpdateMode ${|}
|
||||||
|
|
||||||
${IfThen} "$INSTDIR" == "" ${|} Return ${|}
|
${IfThen} "$INSTDIR" == "" ${|} Return ${|}
|
||||||
${IfThen} "$INSTDIR" == "$EXEDIR" ${|} Return ${|}
|
${IfThen} "$INSTDIR" == "$EXEDIR" ${|} Return ${|}
|
||||||
${IfNotThen} ${FileExists} "$INSTDIR\LameXP.exe" ${|} 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:
|
EnableUpdateMode:
|
||||||
|
|
||||||
FindWindow $R0 "#32770" "" $HWNDPARENT
|
FindWindow $R0 "#32770" "" $HWNDPARENT
|
||||||
@ -598,7 +583,7 @@ Function CheckForUpdate
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.CheckForcedUninstall
|
Function un.CheckForcedUninstall
|
||||||
!insertmacro un.GetCommandlineParameter "Force" "?" $R0
|
${StdUtils.GetParameter} $R0 "Force" "?"
|
||||||
${IfNotThen} "$R0" == "?" ${|} Abort ${|}
|
${IfNotThen} "$R0" == "?" ${|} Abort ${|}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@ -609,7 +594,7 @@ FunctionEnd
|
|||||||
|
|
||||||
Function CheckForPreRelease
|
Function CheckForPreRelease
|
||||||
!ifdef LAMEXP_IS_PRERELEASE
|
!ifdef LAMEXP_IS_PRERELEASE
|
||||||
!insertmacro GetCommandlineParameter "Update" "?" $R0
|
${StdUtils.GetParameter} $R0 "Update" "?"
|
||||||
StrCmp $R0 "?" 0 SkipPrereleaseWarning
|
StrCmp $R0 "?" 0 SkipPrereleaseWarning
|
||||||
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
|
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
|
||||||
Quit
|
Quit
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
;Includes
|
;Includes
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
!include `parameters.nsh`
|
!include `StdUtils.nsh`
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
@ -141,7 +141,7 @@ Section "-LaunchTheInstaller"
|
|||||||
; --------
|
; --------
|
||||||
|
|
||||||
StrCpy $R9 ""
|
StrCpy $R9 ""
|
||||||
!insertmacro GetCommandlineParameter "Update" "?" $R0
|
${StdUtils.GetParameter} $R0 "Update" "?"
|
||||||
|
|
||||||
StrCmp "$R0" "?" +5
|
StrCmp "$R0" "?" +5
|
||||||
StrCmp "$R0" "" 0 +3
|
StrCmp "$R0" "" 0 +3
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -30,7 +30,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 3
|
#define VER_LAMEXP_MINOR_LO 3
|
||||||
#define VER_LAMEXP_TYPE Beta
|
#define VER_LAMEXP_TYPE Beta
|
||||||
#define VER_LAMEXP_PATCH 3
|
#define VER_LAMEXP_PATCH 3
|
||||||
#define VER_LAMEXP_BUILD 717
|
#define VER_LAMEXP_BUILD 721
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Tools versions
|
// Tools versions
|
||||||
|
@ -67,7 +67,7 @@ g_lamexp_tools[] =
|
|||||||
{"29da0d3e810bc3e8d2cddb3db452325eefca0d0c1fff1379fa17806ad447752be1b88e2f", CPU_TYPE_X64_GEN, "aften.x64.exe", 8},
|
{"29da0d3e810bc3e8d2cddb3db452325eefca0d0c1fff1379fa17806ad447752be1b88e2f", CPU_TYPE_X64_GEN, "aften.x64.exe", 8},
|
||||||
{"1cca303fabd889a18fc01c32a7fd861194cfcac60ba63740ea2d7c55d049dbf8f59259fa", CPU_TYPE_ALL_ALL, "alac.exe", 20},
|
{"1cca303fabd889a18fc01c32a7fd861194cfcac60ba63740ea2d7c55d049dbf8f59259fa", CPU_TYPE_ALL_ALL, "alac.exe", 20},
|
||||||
{"6d22d4bbd7ce2162e38f70ac9187bc84eb28233b36ee6c0492d0a6195318782d7f05c444", CPU_TYPE_ALL_ALL, "avs2wav.exe", 13},
|
{"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},
|
{"9ae98a3fc779f69ee876a3b477fbc35a709ba5066823b2eb62eeb015057c38807e4be51f", CPU_TYPE_ALL_ALL, "faad.exe", 27},
|
||||||
{"446054f9a7f705f1aadc9053ca7b8a86a775499ef159978954ebdea92de056c34f8841f7", CPU_TYPE_ALL_ALL, "flac.exe", 121},
|
{"446054f9a7f705f1aadc9053ca7b8a86a775499ef159978954ebdea92de056c34f8841f7", CPU_TYPE_ALL_ALL, "flac.exe", 121},
|
||||||
{"dd68d074c5e13a607580f3a24595c0f3882e37211d2ca628f46e6df20fabcc832dad488a", CPU_TYPE_ALL_ALL, "gpgv.exe", 1411},
|
{"dd68d074c5e13a607580f3a24595c0f3882e37211d2ca628f46e6df20fabcc832dad488a", CPU_TYPE_ALL_ALL, "gpgv.exe", 1411},
|
||||||
@ -90,7 +90,7 @@ g_lamexp_tools[] =
|
|||||||
{"875871c942846f6ad163f9e4949bba2f4331bec678ca5aefe58c961b6825bd0d419a078b", CPU_TYPE_ALL_ALL, "valdec.exe", 31},
|
{"875871c942846f6ad163f9e4949bba2f4331bec678ca5aefe58c961b6825bd0d419a078b", CPU_TYPE_ALL_ALL, "valdec.exe", 31},
|
||||||
{"e657331e281840878a37eb4fb357cb79f33d528ddbd5f9b2e2f7d2194bed4720e1af8eaf", CPU_TYPE_ALL_ALL, "wget.exe", 1114},
|
{"e657331e281840878a37eb4fb357cb79f33d528ddbd5f9b2e2f7d2194bed4720e1af8eaf", CPU_TYPE_ALL_ALL, "wget.exe", 1114},
|
||||||
{"8923cf65e181f8a99f28e9d1ea0d89ace02142241a7f76dae3d540ffd0790495af815644", CPU_TYPE_ALL_ALL, "wma2wav.exe", 20111001},
|
{"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},
|
{"6b053b37d47a9c8659ebf2de43ad19dcba17b9cd868b26974b9cc8c27b6167e8bf07a5a2", CPU_TYPE_ALL_ALL, "wvunpack.exe", 4601},
|
||||||
{NULL, NULL, NULL, NULL}
|
{NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user