Tweaked build script to include the UCRT redistributable DLL's in "shared" builds.

This commit is contained in:
LoRd_MuldeR 2015-10-25 20:39:31 +01:00
parent a1a2d63c42
commit 6ac02fb478
5 changed files with 20 additions and 19 deletions

View File

@ -111,17 +111,18 @@ if "%LAMEXP_REDIST%"=="1" (
copy "%~dp0\..\..\..\Prerequisites\Qt4\v%PATH_VCTOOL%_xp\Shared\plugins\imageformats\q%%i4.dll" "%TMP_PATH%\imageformats" copy "%~dp0\..\..\..\Prerequisites\Qt4\v%PATH_VCTOOL%_xp\Shared\plugins\imageformats\q%%i4.dll" "%TMP_PATH%\imageformats"
) )
copy "%PATH_MSCDIR%\VC\redist\x86\Microsoft.VC%PATH_VCTOOL%.CRT\*.dll" "%TMP_PATH%" copy "%PATH_MSCDIR%\VC\redist\x86\Microsoft.VC%PATH_VCTOOL%.CRT\*.dll" "%TMP_PATH%"
if exist "%PATH_MSCDIR%\VC\redist\1033\vcredist_x86.exe" ( if %PATH_VCTOOL% GEQ 140 (
mkdir "%TMP_PATH%\redist" copy "%PATH_WINSDK%\\Redist\ucrt\DLLs\x86\*.dll" "%TMP_PATH%"
copy "%PATH_MSCDIR%\VC\redist\1033\vcredist_x86.exe" "%TMP_PATH%\redist"
) )
) )
for %%e in (exe,dll) do ( for %%e in (LameXP,Qt,MUtils) do (
for %%f in (%TMP_PATH%\*.%%e) do ( for %%x in (exe,dll) do (
for %%f in (%TMP_PATH%\%%e*.%%x) do (
"%PATH_UPXBIN%\upx.exe" --best "%%f" "%PATH_UPXBIN%\upx.exe" --best "%%f"
) )
) )
)
copy "%~dp0\..\..\ReadMe.txt" "%TMP_PATH%" copy "%~dp0\..\..\ReadMe.txt" "%TMP_PATH%"
copy "%~dp0\..\..\License.txt" "%TMP_PATH%" copy "%~dp0\..\..\License.txt" "%TMP_PATH%"
@ -169,12 +170,12 @@ pushd "%TMP_PATH%"
"%~dp0\..\Utilities\Zip.exe" -r -9 -z "%OUT_FILE%.zip" "*.*" < "%OUT_FILE%.txt" "%~dp0\..\Utilities\Zip.exe" -r -9 -z "%OUT_FILE%.zip" "*.*" < "%OUT_FILE%.txt"
popd popd
"%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_REDIST=%LAMEXP_REDIST%" "/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%.sfx" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "%~dp0\..\NSIS\setup.nsi"
if %ERRORLEVEL% NEQ 0 ( if %ERRORLEVEL% NEQ 0 (
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to build installer^!\n" "%~dp0\..\Utilities\CEcho.exe" red "\nFailed to build installer^!\n"
pause && exit pause && exit
) )
"%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_REDIST=%LAMEXP_REDIST%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_SOURCE_FILE=%OUT_FILE%.sfx" "%~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%.exe" "/DLAMEXP_SOURCE_FILE=%OUT_FILE%.sfx" "%~dp0\..\NSIS\wrapper.nsi"
if %ERRORLEVEL% NEQ 0 ( if %ERRORLEVEL% NEQ 0 (
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to build installer^!\n" "%~dp0\..\Utilities\CEcho.exe" red "\nFailed to build installer^!\n"
pause && exit pause && exit

View File

@ -15,6 +15,7 @@ if "%_LAMEXP_PATHS_INITIALIZED_%"=="%DATE%" (
set "PATH_UPXBIN=" set "PATH_UPXBIN="
set "PATH_MKNSIS=" set "PATH_MKNSIS="
set "PATH_MSCDIR=" set "PATH_MSCDIR="
set "PATH_WINSDK="
set "PATH_QTMSVC=" set "PATH_QTMSVC="
set "PATH_GNUPG1=" set "PATH_GNUPG1="
set "PATH_PANDOC=" set "PATH_PANDOC="
@ -43,6 +44,7 @@ for /f "tokens=2,*" %%s in (%BUILDENV_TXT%) do (
if "%%s"=="PATH_UPXBIN" set "PATH_UPXBIN=%%~t" if "%%s"=="PATH_UPXBIN" set "PATH_UPXBIN=%%~t"
if "%%s"=="PATH_MKNSIS" set "PATH_MKNSIS=%%~t" if "%%s"=="PATH_MKNSIS" set "PATH_MKNSIS=%%~t"
if "%%s"=="PATH_MSCDIR" set "PATH_MSCDIR=%%~t" if "%%s"=="PATH_MSCDIR" set "PATH_MSCDIR=%%~t"
if "%%s"=="PATH_WINSDK" set "PATH_WINSDK=%%~t"
if "%%s"=="PATH_QTMSVC" set "PATH_QTMSVC=%%~t" if "%%s"=="PATH_QTMSVC" set "PATH_QTMSVC=%%~t"
if "%%s"=="PATH_GNUPG1" set "PATH_GNUPG1=%%~t" if "%%s"=="PATH_GNUPG1" set "PATH_GNUPG1=%%~t"
if "%%s"=="PATH_PANDOC" set "PATH_PANDOC=%%~t" if "%%s"=="PATH_PANDOC" set "PATH_PANDOC=%%~t"
@ -60,6 +62,7 @@ set "BUILDENV_TXT="
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_UPXBIN = \"%PATH_UPXBIN:\=\\%\"" "%~dp0\..\Utilities\CEcho.exe" yellow "PATH_UPXBIN = \"%PATH_UPXBIN:\=\\%\""
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MKNSIS = \"%PATH_MKNSIS:\=\\%\"" "%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MKNSIS = \"%PATH_MKNSIS:\=\\%\""
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MSCDIR = \"%PATH_MSCDIR:\=\\%\"" "%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MSCDIR = \"%PATH_MSCDIR:\=\\%\""
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_WINSDK = \"%PATH_WINSDK:\=\\%\""
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_QTMSVC = \"%PATH_QTMSVC:\=\\%\"" "%~dp0\..\Utilities\CEcho.exe" yellow "PATH_QTMSVC = \"%PATH_QTMSVC:\=\\%\""
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_GNUPG1 = \"%PATH_GNUPG1:\=\\%\"" "%~dp0\..\Utilities\CEcho.exe" yellow "PATH_GNUPG1 = \"%PATH_GNUPG1:\=\\%\""
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_PANDOC = \"%PATH_PANDOC:\=\\%\"" "%~dp0\..\Utilities\CEcho.exe" yellow "PATH_PANDOC = \"%PATH_PANDOC:\=\\%\""
@ -75,6 +78,7 @@ call:validate_path PATH_UPXBIN "%PATH_UPXBIN%\upx.exe"
call:validate_path PATH_MKNSIS "%PATH_MKNSIS%\makensis.exe" call:validate_path PATH_MKNSIS "%PATH_MKNSIS%\makensis.exe"
call:validate_path PATH_MSCDIR "%PATH_MSCDIR%\VC\vcvarsall.bat" call:validate_path PATH_MSCDIR "%PATH_MSCDIR%\VC\vcvarsall.bat"
call:validate_path PATH_MSCDIR "%PATH_MSCDIR%\VC\bin\cl.exe" call:validate_path PATH_MSCDIR "%PATH_MSCDIR%\VC\bin\cl.exe"
call:validate_path PATH_WINSDK "%PATH_WINSDK%\Redist\ucrt\DLLs\x86\ucrtbase.dll"
call:validate_path PATH_QTMSVC "%PATH_QTMSVC%\bin\uic.exe" call:validate_path PATH_QTMSVC "%PATH_QTMSVC%\bin\uic.exe"
call:validate_path PATH_QTMSVC "%PATH_QTMSVC%\bin\moc.exe" call:validate_path PATH_QTMSVC "%PATH_QTMSVC%\bin\moc.exe"
call:validate_path PATH_QTMSVC "%PATH_QTMSVC%\bin\rcc.exe" call:validate_path PATH_QTMSVC "%PATH_QTMSVC%\bin\rcc.exe"

View File

@ -1,6 +1,7 @@
#define PATH_UPXBIN "C:\Program Files\UPX" #define PATH_UPXBIN "C:\Program Files\UPX"
#define PATH_MKNSIS "C:\Program Files\NSIS\Unicode" #define PATH_MKNSIS "C:\Program Files\NSIS\Unicode"
#define PATH_MSCDIR "C:\Program Files (x86)\Microsoft Visual Studio 14.0" #define PATH_MSCDIR "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
#define PATH_WINSDK "C:\Program Files (x86)\Windows Kits\10"
#define PATH_QTMSVC "C:\QtSDK\Desktop\Qt\4.8.7" #define PATH_QTMSVC "C:\QtSDK\Desktop\Qt\4.8.7"
#define PATH_GNUPG1 "C:\Program Files\GNU\GnuPG" #define PATH_GNUPG1 "C:\Program Files\GNU\GnuPG"
#define PATH_PANDOC "C:\Program Files\Pandoc" #define PATH_PANDOC "C:\Program Files\Pandoc"

View File

@ -52,9 +52,6 @@
!ifndef LAMEXP_UPX_PATH !ifndef LAMEXP_UPX_PATH
!error "LAMEXP_UPX_PATH is not defined !!!" !error "LAMEXP_UPX_PATH is not defined !!!"
!endif !endif
!ifndef LAMEXP_REDIST
!error "LAMEXP_REDIST is not defined !!!"
!endif
;UUID ;UUID
!define MyRegPath "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}" !define MyRegPath "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}"
@ -576,13 +573,11 @@ Section "!Install Files"
File /a /r `${LAMEXP_SOURCE_PATH}\*.png` File /a /r `${LAMEXP_SOURCE_PATH}\*.png`
SectionEnd SectionEnd
!if ${LAMEXP_REDIST} != 0 # Section "-Install VCRedist"
Section "-Install VCRedist" # !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_VCREDIST)"
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_VCREDIST)" # File /a `/oname=$PLUGINSDIR\vcredist_x86.exe` `${LAMEXP_SOURCE_PATH}\redist\vcredist_x86.exe`
File /a `/oname=$PLUGINSDIR\vcredist_x86.exe` `${LAMEXP_SOURCE_PATH}\redist\vcredist_x86.exe` # ExecWait '"$PLUGINSDIR\vcredist_x86.exe" /install /passive /norestart'
ExecWait '"$PLUGINSDIR\vcredist_x86.exe" /install /passive /norestart' # SectionEnd
SectionEnd
!endif
Section "-Write Uninstaller" Section "-Write Uninstaller"
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_MAKEUNINST)" !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_MAKEUNINST)"

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 1 #define VER_LAMEXP_PATCH 1
#define VER_LAMEXP_BUILD 1823 #define VER_LAMEXP_BUILD 1824
#define VER_LAMEXP_CONFG 1818 #define VER_LAMEXP_CONFG 1818
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////