From 93641a7bfced4a4bc2d9f53aee1f08446dc0ee03 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sat, 14 Dec 2013 13:19:30 +0100 Subject: [PATCH] Some more installer refinements. --- etc/setup/language/en.nsh | 4 +-- etc/setup/license.rtf | Bin 1641 -> 1652 bytes etc/setup/setup.nsi | 50 ++++++++++++++++++------------- src/version.h | 2 +- z_build.bat | 61 +++++++++----------------------------- 5 files changed, 47 insertions(+), 70 deletions(-) diff --git a/etc/setup/language/en.nsh b/etc/setup/language/en.nsh index 2433aa4..5b8494c 100644 --- a/etc/setup/language/en.nsh +++ b/etc/setup/language/en.nsh @@ -1,5 +1,5 @@ ; /////////////////////////////////////////////////////////////////////////////// -; // LameXP - Audio Encoder Front-End +; // Simple x264 Launcher ; // Copyright (C) 2004-2011 LoRd_MuldeR ; // ; // This program is free software; you can redistribute it and/or modify @@ -38,5 +38,5 @@ LangString X264_LANG_LINK_CHANGELOG ${LANG_ENGLISH} "Version History" LangString X264_LANG_LINK_TRANSLATE ${LANG_ENGLISH} "Translator's Guide" LangString X264_LANG_LINK_UNINSTALL ${LANG_ENGLISH} "Uninstall" LangString X264_LANG_LINK_FAQ ${LANG_ENGLISH} "Frequently Asked Questions" -LangString X264_LANG_LINK_MANUAL ${LANG_ENGLISH} "User Manual" +LangString X264_LANG_LINK_MANUAL ${LANG_ENGLISH} "User Manual (Readme)" LangString X264_LANG_PRERELEASE_WARNING ${LANG_ENGLISH} "You are about to install a Demo (pre-release) version of Simple x264 Launcher!" diff --git a/etc/setup/license.rtf b/etc/setup/license.rtf index 996d0dd747ba9e2381301bd1021fa15f253f4773..d8f3e8f0a6fd9a91544958e6f103cd7054d63692 100644 GIT binary patch delta 100 zcmaFK^Mz+ZCX0e!YWc*>yKFIO#fD}Ilie8aOg_oXH`#y*LQ63#vg#Tc7#dHuW}eQJ qW;po*i_GSa%vTs$3lfWXxhB^!X;1#a8ZBlB)*k~FgpjqoTnqrz93VRY delta 66 zcmeyu^O9#m=EU5)lLHv_x diff --git a/etc/setup/setup.nsi b/etc/setup/setup.nsi index 448a3d1..2d2eab6 100644 --- a/etc/setup/setup.nsi +++ b/etc/setup/setup.nsi @@ -194,11 +194,12 @@ UninstPage Custom un.LockedListShow ;-------------------------------- !insertmacro MUI_LANGUAGE "English" ;first language is the default language -!insertmacro MUI_LANGUAGE "German" -!insertmacro MUI_LANGUAGE "Spanish" -!insertmacro MUI_LANGUAGE "Russian" -!insertmacro MUI_LANGUAGE "Ukrainian" -!insertmacro MUI_LANGUAGE "Polish" + +; !insertmacro MUI_LANGUAGE "German" +; !insertmacro MUI_LANGUAGE "Spanish" +; !insertmacro MUI_LANGUAGE "Russian" +; !insertmacro MUI_LANGUAGE "Ukrainian" +; !insertmacro MUI_LANGUAGE "Polish" ; !insertmacro MUI_LANGUAGE "French" ; !insertmacro MUI_LANGUAGE "SpanishInternational" @@ -433,24 +434,26 @@ Section "!Install Files" SetOutPath "$INSTDIR" File /a `/oname=$R0` `${X264_SOURCE_PATH}\x264_launcher.exe` - File /a `${X264_SOURCE_PATH}\*.dll` - File /a `${X264_SOURCE_PATH}\*.txt` + + SetOutPath "$INSTDIR\imageformats" + File /a `${X264_SOURCE_PATH}\imageformats\*.dll` SetOutPath "$INSTDIR\toolset\x86" - File /a `${X264_SOURCE_PATH}\toolset\x86\*.exe` - File /a `${X264_SOURCE_PATH}\toolset\x86\*.dll` + File /a `${X264_SOURCE_PATH}\toolset\x86\*.exe` + File /nonfatal /a `${X264_SOURCE_PATH}\toolset\x86\*.dll` SetOutPath "$INSTDIR\toolset\x64" - File /a `${X264_SOURCE_PATH}\toolset\x64\*.exe` - File /a `${X264_SOURCE_PATH}\toolset\x64\*.dll` + File /a `${X264_SOURCE_PATH}\toolset\x64\*.exe` + File /nonfatal /a `${X264_SOURCE_PATH}\toolset\x64\*.dll` SetOutPath "$INSTDIR\toolset\common" - File /a `${X264_SOURCE_PATH}\toolset\common\*.exe` - File /a `${X264_SOURCE_PATH}\toolset\common\*.dll` - File /a `${X264_SOURCE_PATH}\toolset\common\*.gpg` - - SetOutPath "$INSTDIR\imageformats" - File /a `${X264_SOURCE_PATH}\imageformats*.exe` + File /a `${X264_SOURCE_PATH}\toolset\common\*.exe` + File /a `${X264_SOURCE_PATH}\toolset\common\*.gpg` + File /nonfatal /a `${X264_SOURCE_PATH}\toolset\common\*.dll` + + SetOutPath "$INSTDIR" + File /a `${X264_SOURCE_PATH}\*.dll` + File /a `${X264_SOURCE_PATH}\*.txt` SectionEnd Section "-Write Uinstaller" @@ -506,7 +509,7 @@ Section "-Update Registry" WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"' WriteRegStr HKLM "${MyRegPath}" "DisplayName" "Simple x264 Launcher v2" WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR " - WriteRegStr HKLM "${MyRegPath}" "Simple x264 Launcher [Build #${X264_BUILD}]" + WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "Build #${X264_BUILD} (${X264_DATE})" WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}" WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}" SectionEnd @@ -560,7 +563,14 @@ Section "Uninstall" ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName" ${IfThen} "$R0" == "" ${|} StrCpy $R0 "x264_launcher.exe" ${|} - Delete /REBOOTOK `$INSTDIR\$R0` + DeleteAppBinary: + ClearErrors + Delete `$INSTDIR\$R0` + + ${If} ${Errors} + MessageBox MB_TOPMOST|MB_ICONSTOP|MB_RETRYCANCEL 'Could not delete the "$R0" file. Is program still running?' IDRETRY DeleteAppBinary + Abort "Could not delete application binary!" + ${EndIf} Delete /REBOOTOK `$INSTDIR\*.exe` Delete /REBOOTOK `$INSTDIR\*.dll` @@ -661,5 +671,5 @@ FunctionEnd Function ShowReadmeFunction !insertmacro DisableNextButton $R0 - ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\FAQ.html" "open" "" + ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\ReadMe.txt" "open" "" FunctionEnd diff --git a/src/version.h b/src/version.h index 0733844..6f4996e 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 2 #define VER_X264_PATCH 7 -#define VER_X264_BUILD 691 +#define VER_X264_BUILD 698 #define VER_X264_MINIMUM_REV 2363 #define VER_X264_CURRENT_API 140 diff --git a/z_build.bat b/z_build.bat index e3d0016..b60595f 100644 --- a/z_build.bat +++ b/z_build.bat @@ -127,61 +127,28 @@ attrib +R "%PACK_PATH%\*.txt" REM /////////////////////////////////////////////////////////////////////////// REM // Setup install parameters REM /////////////////////////////////////////////////////////////////////////// -set "NSI_FILE=%TMP%\~%RANDOM%%RANDOM%.nsi" -set "OUT_NAME=x264_x64.%ISO_DATE%" -set "OUT_PATH=%~dp0\bin" -set "OUT_FULL=%OUT_PATH%\%OUT_NAME%.exe" +set "OUT_PATH=%~dp0bin\x264_x64.%ISO_DATE%" :GenerateOutfileName -if exist "%OUT_FULL%" ( - set "OUT_NAME=%OUT_NAME%.new" - set "OUT_FULL=%OUT_PATH%\%OUT_NAME%.exe" +if exist "%OUT_PATH%.exe" ( + set "OUT_PATH=%OUT_PATH%.new" + goto GenerateOutfileName +) +if exist "%OUT_PATH%.sfx" ( + set "OUT_PATH=%OUT_PATH%.new" goto GenerateOutfileName ) -REM /////////////////////////////////////////////////////////////////////////// -REM // Generate install script -REM /////////////////////////////////////////////////////////////////////////// -echo #Generated File - Do NOT modify! > "%NSI_FILE%" -echo !define ZIP2EXE_NAME `Simple x264 Launcher (%ISO_DATE%)` >> "%NSI_FILE%" -echo !define ZIP2EXE_OUTFILE `%OUT_FULL%` >> "%NSI_FILE%" -echo !define ZIP2EXE_COMPRESSOR_LZMA >> "%NSI_FILE%" -echo !define ZIP2EXE_COMPRESSOR_SOLID >> "%NSI_FILE%" -echo !define ZIP2EXE_INSTALLDIR `$PROGRAMFILES\MuldeR\Simple x264 Launcher v2` >> "%NSI_FILE%" -echo !define ZIP2EXE_REGPATH `SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{986E454F-DACA-4326-A9C7-3E46C0BFFDCE}` >> "%NSI_FILE%" -echo !define MUI_INSTFILESPAGE_COLORS "C5DEFB 000000" >> "%NSI_FILE%" -echo RequestExecutionLevel Admin >> "%NSI_FILE%" -echo ShowInstDetails show >> "%NSI_FILE%" -echo BrandingText `Created: %ISO_DATE%, %ISO_TIME% [Build #%BUILD_NO%]` >> "%NSI_FILE%" -echo InstallDirRegKey HKLM `${ZIP2EXE_REGPATH}` InstallLocation >> "%NSI_FILE%" -echo !include `${NSISDIR}\Contrib\zip2exe\Base.nsh` >> "%NSI_FILE%" -echo SetCompressorDictSize 96 >> "%NSI_FILE%" -echo !include `${NSISDIR}\Contrib\zip2exe\Modern.nsh` >> "%NSI_FILE%" -echo !include `%~dp0\etc\check_os.nsh` >> "%NSI_FILE%" -echo !include `%~dp0\etc\finalization.nsh` >> "%NSI_FILE%" -echo !include `%~dp0\etc\version.nsh` >> "%NSI_FILE%" -echo !insertmacro X264_VERSIONINFO `%ISO_DATE%` `%ISO_TIME%` `%BUILD_NO%` >> "%NSI_FILE%" -echo !insertmacro SECTION_BEGIN >> "%NSI_FILE%" -echo Delete `$INSTDIR\*.exe` >> "%NSI_FILE%" -echo Delete `$INSTDIR\*.dll` >> "%NSI_FILE%" -echo Delete `$INSTDIR\toolset\*.exe` >> "%NSI_FILE%" -echo Delete `$INSTDIR\toolset\x86\*.exe` >> "%NSI_FILE%" -echo Delete `$INSTDIR\toolset\x86\*.dll` >> "%NSI_FILE%" -echo Delete `$INSTDIR\toolset\x64\*.exe` >> "%NSI_FILE%" -echo Delete `$INSTDIR\toolset\x64\*.dll` >> "%NSI_FILE%" -echo File /a /r `%PACK_PATH%\*.exe` >> "%NSI_FILE%" -echo File /a /r `%PACK_PATH%\*.dll` >> "%NSI_FILE%" -echo File /a /r `%PACK_PATH%\*.txt` >> "%NSI_FILE%" -echo WriteRegStr HKLM `${ZIP2EXE_REGPATH}` InstallLocation `$INSTDIR` >> "%NSI_FILE%" -echo !include `%~dp0\etc\shortcut.nsh` >> "%NSI_FILE%" -echo !insertmacro SECTION_END >> "%NSI_FILE%" - REM /////////////////////////////////////////////////////////////////////////// REM // Build the installer REM /////////////////////////////////////////////////////////////////////////// -"%NSIS_PATH%\makensis.exe" "%NSI_FILE%" +"%NSIS_PATH%\makensis.exe" "/DX264_UPX_PATH=%UPX3_PATH%" "/DX264_DATE=%ISO_DATE%" "/DX264_BUILD=%BUILD_NO%" "/DX264_OUTPUT_FILE=%OUT_PATH%.sfx" "/DX264_SOURCE_PATH=%PACK_PATH%" "%~dp0\etc\setup\setup.nsi" if not "%ERRORLEVEL%"=="0" goto BuildError -attrib +R "%OUT_FULL%" -del "%NSI_FILE%" + +"%NSIS_PATH%\makensis.exe" "/DX264_UPX_PATH=%UPX3_PATH%" "/DX264_DATE=%ISO_DATE%" "/DX264_BUILD=%BUILD_NO%" "/DX264_OUTPUT_FILE=%OUT_PATH%.exe" "/DX264_SOURCE_FILE=%OUT_PATH%.sfx" "%~dp0\etc\setup\wrapper.nsi" +if not "%ERRORLEVEL%"=="0" goto BuildError + +attrib +R "%OUT_PATH%.exe" +attrib +R "%OUT_PATH%.sfx" rmdir /Q /S "%PACK_PATH%" REM ///////////////////////////////////////////////////////////////////////////