Some more fine-tuning for the recent installer improvements.
This commit is contained in:
parent
9d09a8d5b0
commit
b09aaa30dc
@ -81,7 +81,7 @@ REM ------------------------------------------
|
||||
REM :: DELETE OLD OUTPUT FILE ::
|
||||
REM ------------------------------------------
|
||||
del "%OUT_FILE%.exe"
|
||||
del "%OUT_FILE%.sfx.exe"
|
||||
del "%OUT_FILE%.sfx"
|
||||
del "%OUT_FILE%.zip"
|
||||
REM ------------------------------------------
|
||||
if exist "%OUT_FILE%.exe" (
|
||||
@ -131,8 +131,8 @@ REM ------------------------------------------
|
||||
REM :: CREATE PACKAGES ::
|
||||
REM ------------------------------------------
|
||||
"%PATH_SEVENZ%\7z.exe" a -tzip -r "%OUT_FILE%.zip" "%TMP_PATH%\*"
|
||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "%~dp0\..\NSIS\setup.nsi"
|
||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_SOURCE_FILE=%OUT_FILE%.exe" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.sfx.exe" "%~dp0\..\NSIS\wrapper.nsi"
|
||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.sfx" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "%~dp0\..\NSIS\setup.nsi"
|
||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_SOURCE_FILE=%OUT_FILE%.sfx" "%~dp0\..\NSIS\wrapper.nsi"
|
||||
rd /S /Q "%TMP_PATH%"
|
||||
REM ------------------------------------------
|
||||
if not exist "%OUT_FILE%.zip" (
|
||||
@ -145,12 +145,12 @@ if not exist "%OUT_FILE%.exe" (
|
||||
)
|
||||
REM ------------------------------------------
|
||||
attrib +R "%OUT_FILE%.zip"
|
||||
attrib +R "%OUT_FILE%.sfx"
|
||||
attrib +R "%OUT_FILE%.exe"
|
||||
attrib +R "%OUT_FILE%.sfx.exe"
|
||||
REM ------------------------------------------
|
||||
REM :: CREATE SIGNATURE ::
|
||||
REM ------------------------------------------
|
||||
"%PATH_GNUPG1%\gpg.exe" --detach-sign "%OUT_FILE%.sfx.exe"
|
||||
"%PATH_GNUPG1%\gpg.exe" --detach-sign "%OUT_FILE%.exe"
|
||||
attrib +R "%OUT_FILE%.exe.sig"
|
||||
REM ------------------------------------------
|
||||
echo.
|
||||
|
@ -68,9 +68,10 @@
|
||||
|
||||
RequestExecutionLevel user
|
||||
XPStyle on
|
||||
InstallColors /windows
|
||||
Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
|
||||
OutFile "${LAMEXP_OUTPUT_FILE}"
|
||||
BrandingText "${LAMEXP_DATE} / Build ${LAMEXP_BUILD}"
|
||||
BrandingText "${LAMEXP_DATE} / Build #${LAMEXP_BUILD}"
|
||||
InstallDir "$PROGRAMFILES\MuldeR\LameXP v${LAMEXP_VERSION}"
|
||||
Icon "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
|
||||
ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe"
|
||||
@ -127,28 +128,41 @@ Section "-LaunchTheInstaller"
|
||||
|
||||
InitPluginsDir
|
||||
SetOutPath "$PLUGINSDIR"
|
||||
File "/oname=$PLUGINSDIR\Install.exe" "${LAMEXP_SOURCE_FILE}"
|
||||
!insertmacro GetCommandlineParameter "Update" "?" $R9
|
||||
File "/oname=$PLUGINSDIR\LameXP-Install.exe" "${LAMEXP_SOURCE_FILE}"
|
||||
|
||||
; --------
|
||||
|
||||
!insertmacro GetCommandlineParameter "Update" "?" $R0
|
||||
|
||||
StrCmp "$R0" "?" 0 +3
|
||||
StrCpy $R9 ""
|
||||
Goto RunTryAgain
|
||||
|
||||
StrCmp "$R0" "" 0 +3
|
||||
StrCpy $R9 "/Update"
|
||||
Goto RunTryAgain
|
||||
|
||||
StrCpy $R9 "/Update=$R0"
|
||||
|
||||
; --------
|
||||
|
||||
RunTryAgain:
|
||||
|
||||
ClearErrors
|
||||
StrCmp "$R9" "?" +3 0
|
||||
ExecShell "open" "$PLUGINSDIR\Install.exe" '/Update=$R9' SW_SHOWNORMAL
|
||||
Goto +2
|
||||
ExecShell "open" "$PLUGINSDIR\Install.exe" '/Update' SW_SHOWNORMAL
|
||||
ExecShell "open" "$PLUGINSDIR\LameXP-Install.exe" '$R9' SW_SHOWNORMAL
|
||||
IfErrors 0 RunSuccess
|
||||
|
||||
ClearErrors
|
||||
StrCmp "$R9" "?" +3 0
|
||||
ExecShell "" "$PLUGINSDIR\Install.exe" '/Update=$R9' SW_SHOWNORMAL
|
||||
Goto +2
|
||||
ExecShell "" "$PLUGINSDIR\Install.exe" '/Update' SW_SHOWNORMAL
|
||||
ExecShell "" "$PLUGINSDIR\LameXP-Install.exe" '$R9' SW_SHOWNORMAL
|
||||
IfErrors 0 RunSuccess
|
||||
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONSTOP|MB_TOPMOST "Failed to launch installer. Please try again!" IDRETRY RunTryAgain
|
||||
Abort "Failed to launch installer :-("
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint "Failed to launch installer :-("
|
||||
SetDetailsPrint listonly
|
||||
Abort
|
||||
|
||||
RunSuccess:
|
||||
Delete /REBOOTOK "$PLUGINSDIR\Install.exe"
|
||||
Delete /REBOOTOK "$PLUGINSDIR\LameXP-Install.exe"
|
||||
SectionEnd
|
||||
|
Loading…
Reference in New Issue
Block a user