From b09aaa30dcad8d50f9c8f805d1466e6db4c337bf Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sun, 2 Oct 2011 23:32:15 +0200 Subject: [PATCH] Some more fine-tuning for the recent installer improvements. --- etc/Deployment/_deploy.bat | 10 +++++----- etc/NSIS/wrapper.nsi | 40 +++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/etc/Deployment/_deploy.bat b/etc/Deployment/_deploy.bat index cab0aaa7..cca3c441 100644 --- a/etc/Deployment/_deploy.bat +++ b/etc/Deployment/_deploy.bat @@ -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. diff --git a/etc/NSIS/wrapper.nsi b/etc/NSIS/wrapper.nsi index 39f64079..abde137d 100644 --- a/etc/NSIS/wrapper.nsi +++ b/etc/NSIS/wrapper.nsi @@ -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