2010-11-11 00:25:23 +01:00
|
|
|
@echo off
|
2010-11-21 23:20:14 +01:00
|
|
|
setlocal ENABLEDELAYEDEXPANSION
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: SETUP ENVIRONMENT
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
set "_LAMEXP_PATHS_INITIALIZED_="
|
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
call "%~dp0\_paths.bat"
|
2014-12-22 22:40:20 +01:00
|
|
|
call "%~dp0\_date.bat"
|
|
|
|
|
2010-11-11 00:25:23 +01:00
|
|
|
if "%LAMEXP_CONFIG%"=="" (
|
|
|
|
set "LAMEXP_CONFIG=Release"
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2014-12-22 23:38:23 +01:00
|
|
|
if "%LAMEXP_PLATFORM%"=="" (
|
|
|
|
set "LAMEXP_PLATFORM=Win32"
|
|
|
|
)
|
|
|
|
|
2010-11-11 00:41:49 +01:00
|
|
|
if not "%LAMEXP_REDIST%"=="0" (
|
|
|
|
set "LAMEXP_REDIST=1"
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: SETUP PATHS
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2014-12-22 23:38:23 +01:00
|
|
|
set "BIN_PATH=%~dp0\..\..\bin\%LAMEXP_PLATFORM%\%LAMEXP_CONFIG%"
|
2011-04-22 22:10:55 +02:00
|
|
|
set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%ISO_DATE%.%RANDOM%.tmp"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2011-04-16 21:20:21 +02:00
|
|
|
if "%LAMEXP_SKIP_BUILD%"=="YES" (
|
|
|
|
goto SkipBuildThisTime
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: CLEAN UP
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "\n==========================================================================="
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "Cleaning up..."
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
|
2014-12-22 23:38:23 +01:00
|
|
|
|
|
|
|
for %%i in (bin,obj,tmp,ipch) do (
|
|
|
|
del /Q /S /F "%~dp0\..\..\%%i\*.*"
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: UPDATE LANGUAGE FILES AND DCOS
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
call "%~dp0\_mkdocs.bat"
|
2011-04-19 16:21:19 +02:00
|
|
|
call "%~dp0\_lupdate.bat"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: BUILD THE BINARIES
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2014-12-22 23:38:23 +01:00
|
|
|
call "%~dp0\_build.bat" "%~dp0\..\..\%PATH_VCPROJ%" "%LAMEXP_PLATFORM%" "%LAMEXP_CONFIG%"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2011-04-16 21:20:21 +02:00
|
|
|
:SkipBuildThisTime
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: READ VERSION INFO
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
call "%~dp0\_version.bat"
|
2018-04-19 23:35:38 +02:00
|
|
|
call "%~dp0\_revision.bat"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: GENERATE OUTPUT FILE NAME
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2012-07-21 19:16:12 +02:00
|
|
|
mkdir "%~dp0\..\..\out" 2> NUL
|
2016-10-07 21:40:57 +02:00
|
|
|
set "OUT_NAME=%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%"
|
|
|
|
set "OUT_FILE=%~dp0\..\..\out\!OUT_NAME!"
|
2010-11-21 23:20:14 +01:00
|
|
|
for /L %%n in (1, 1, 99) do (
|
2016-10-07 21:40:57 +02:00
|
|
|
if exist "!OUT_FILE!.exe" set "OUT_NAME=%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
|
|
|
|
if exist "!OUT_FILE!.zip" set "OUT_NAME=%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
|
|
|
|
set "OUT_FILE=%~dp0\..\..\out\!OUT_NAME!"
|
2010-11-21 23:20:14 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: DELETE OLD OUTPUT FILE
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
for %%i in (exe,sfx,zip,txt) do (
|
|
|
|
del "%OUT_FILE%.%%i" 2> NUL
|
|
|
|
if exist "%OUT_FILE%.%%i" (
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to delete existing output file^!\n"
|
2014-12-23 00:23:41 +01:00
|
|
|
pause && exit
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2010-11-11 00:25:23 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
2014-12-22 23:38:23 +01:00
|
|
|
:: COPY BINARY FILES AND REDIST
|
2014-12-22 22:40:20 +01:00
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "\n==========================================================================="
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "Copying binary files..."
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
|
2014-12-23 00:23:41 +01:00
|
|
|
|
2014-12-25 01:15:43 +01:00
|
|
|
rd /S /Q "%TMP_PATH%" 2> NUL
|
2010-11-11 00:25:23 +01:00
|
|
|
mkdir "%TMP_PATH%"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2019-06-20 17:13:26 +02:00
|
|
|
if %PATH_VCTOOL% GEQ 142 (
|
|
|
|
set "PATH_REDIST_QT=%~dp0\..\..\..\Prerequisites\Qt4\v%PATH_VCTOOL%"
|
|
|
|
set "PATH_REDIST_VC=%~dp0\..\..\..\Prerequisites\MSVC\redist\vc\v%PATH_VCTOOL%"
|
|
|
|
) else (
|
|
|
|
set "PATH_REDIST_QT=%~dp0\..\..\..\Prerequisites\Qt4\v%PATH_VCTOOL%_xp"
|
|
|
|
set "PATH_REDIST_VC=%~dp0\..\..\..\Prerequisites\MSVC\redist\vc\v%PATH_VCTOOL%_xp"
|
|
|
|
)
|
|
|
|
|
2024-08-25 21:13:19 +02:00
|
|
|
if "%LAMEXP_CONFIG%"=="Debug" (
|
|
|
|
set "QT_REDIST_CONFIG=Debug"
|
|
|
|
set "QT_REDIST_SUFFIX=d"
|
|
|
|
) else (
|
|
|
|
set "QT_REDIST_CONFIG=Shared"
|
|
|
|
set "QT_REDIST_SUFFIX="
|
|
|
|
)
|
|
|
|
|
2017-08-19 19:36:17 +02:00
|
|
|
call "%~dp0\_copy.bat" "%BIN_PATH%\LameXP.exe" "%TMP_PATH%"
|
2017-12-12 01:26:41 +01:00
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\etc\Manifest\VisualElements.xml" "%TMP_PATH%\LameXP.VisualElementsManifest.xml"
|
2017-08-19 19:36:17 +02:00
|
|
|
|
2010-11-11 00:41:49 +01:00
|
|
|
if "%LAMEXP_REDIST%"=="1" (
|
2017-08-19 19:36:17 +02:00
|
|
|
call "%~dp0\_copy.bat" "%BIN_PATH%\LameXP.rcc" "%TMP_PATH%"
|
|
|
|
call "%~dp0\_copy.bat" "%BIN_PATH%\MUtils32-?.dll" "%TMP_PATH%"
|
2010-11-11 14:11:44 +01:00
|
|
|
mkdir "%TMP_PATH%\imageformats"
|
2014-12-22 22:40:20 +01:00
|
|
|
for %%i in (Core,Gui,Network,Xml,Svg) do (
|
2024-08-25 21:13:19 +02:00
|
|
|
call "%~dp0\_copy.bat" "%PATH_REDIST_QT%\%QT_REDIST_CONFIG%\bin\Qt%%i%QT_REDIST_SUFFIX%4.dll" "%TMP_PATH%"
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2014-12-25 01:06:17 +01:00
|
|
|
for %%i in (gif,ico,jpeg,mng,svg,tga,tiff) do (
|
2024-08-25 21:13:19 +02:00
|
|
|
call "%~dp0\_copy.bat" "%PATH_REDIST_QT%\%QT_REDIST_CONFIG%\plugins\imageformats\q%%i%QT_REDIST_SUFFIX%4.dll" "%TMP_PATH%\imageformats"
|
2014-12-25 01:06:17 +01:00
|
|
|
)
|
2021-02-16 20:48:36 +01:00
|
|
|
for %%i in ("%PATH_REDIST_VC%\x86\*.dll") do call "%~dp0\_copy.bat" "%%~i" "%TMP_PATH%"
|
2015-10-25 20:39:31 +01:00
|
|
|
if %PATH_VCTOOL% GEQ 140 (
|
2021-02-16 20:48:36 +01:00
|
|
|
for %%i in ("%~dp0\..\..\..\Prerequisites\MSVC\redist\ucrt\DLLs\x86\*.dll") do (
|
|
|
|
call "%~dp0\_copy.bat" "%%~i" "%TMP_PATH%"
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2010-11-11 00:41:49 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2019-08-17 15:18:25 +02:00
|
|
|
for %%x in (exe,dll) do (
|
2021-02-16 20:48:36 +01:00
|
|
|
for %%f in ("%TMP_PATH%\*.%%x") do (
|
2019-08-17 15:18:25 +02:00
|
|
|
"%~dp0\..\..\..\Prerequisites\RichHeaderEraser\rchhdrrsr.exe" "%%~ff"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2024-08-25 21:13:19 +02:00
|
|
|
if not "%LAMEXP_CONFIG%"=="Debug" (
|
|
|
|
for %%e in (LameXP,Qt,MUtils) do (
|
|
|
|
for %%x in (exe,dll) do (
|
|
|
|
for %%f in ("%TMP_PATH%\%%e*.%%x") do (
|
|
|
|
"%~dp0\..\..\..\Prerequisites\UPX\upx.exe" --best "%%~ff"
|
|
|
|
)
|
2015-10-25 20:39:31 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2010-11-11 00:25:23 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2017-08-19 19:36:17 +02:00
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\ReadMe.txt" "%TMP_PATH%"
|
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\License.txt" "%TMP_PATH%"
|
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\Copying.txt" "%TMP_PATH%"
|
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\doc\Changelog.html" "%TMP_PATH%"
|
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\doc\Translate.html" "%TMP_PATH%"
|
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\doc\Manual.html" "%TMP_PATH%"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2014-12-25 01:15:43 +01:00
|
|
|
mkdir "%TMP_PATH%\img\lamexp"
|
2021-02-16 20:48:36 +01:00
|
|
|
for %%f in ("%~dp0\..\..\doc\img\lamexp\*.png") do (
|
|
|
|
call "%~dp0\_copy.bat" "%%~f" "%TMP_PATH%\img\lamexp"
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2012-07-01 21:11:04 +02:00
|
|
|
if not "%VER_LAMEXP_TYPE%" == "Final" (
|
|
|
|
if not "%VER_LAMEXP_TYPE%" == "Hotfix" (
|
2017-08-19 19:36:17 +02:00
|
|
|
call "%~dp0\_copy.bat" "%~dp0\..\..\doc\PRE_RELEASE_INFO.txt" "%TMP_PATH%"
|
2012-07-01 21:11:04 +02:00
|
|
|
)
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2014-12-25 01:15:43 +01:00
|
|
|
if exist "%~dp0\_postproc.bat" (
|
|
|
|
call "%~dp0\_postproc.bat" "%TMP_PATH%"
|
|
|
|
)
|
|
|
|
|
2018-04-19 23:35:38 +02:00
|
|
|
echo Release: %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%.%VER_LAMEXP_BUILD%> "%TMP_PATH%\LameXP.tag"
|
|
|
|
echo Git-%GIT_REV_NAME%-r%GIT_REV_NMBR%-%GIT_REV_HASH% [%GIT_REV_DATE%] [%GIT_REV_TIME%]>> "%TMP_PATH%\LameXP.tag"
|
|
|
|
|
2012-07-02 01:19:32 +02:00
|
|
|
attrib +R "%TMP_PATH%\*.txt"
|
|
|
|
attrib +R "%TMP_PATH%\*.html"
|
|
|
|
attrib +R "%TMP_PATH%\*.exe"
|
2014-12-25 13:51:14 +01:00
|
|
|
attrib +R "%TMP_PATH%\*.dll"
|
2018-04-19 23:35:38 +02:00
|
|
|
attrib +R "%TMP_PATH%\*.tag"
|
2017-12-12 01:26:41 +01:00
|
|
|
attrib +R "%TMP_PATH%\*.xml"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2018-04-19 23:35:38 +02:00
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: CREATE TAG
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo LameXP - Audio Encoder Front-End> "%OUT_FILE%.txt"
|
2018-04-19 23:40:28 +02:00
|
|
|
echo Version %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO% %VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH%, Build #%VER_LAMEXP_BUILD% [%ISO_DATE%] [%ISO_TIME%]>> "%OUT_FILE%.txt"
|
2018-04-19 23:35:38 +02:00
|
|
|
echo Git-%GIT_REV_NAME%-r%GIT_REV_NMBR%-%GIT_REV_HASH% [%GIT_REV_DATE%] [%GIT_REV_TIME%]>> "%OUT_FILE%.txt"
|
|
|
|
echo.>> "%OUT_FILE%.txt"
|
|
|
|
|
|
|
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
|
|
|
echo README.TXT>> "%OUT_FILE%.txt"
|
|
|
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
|
|
|
echo.>> "%OUT_FILE%.txt"
|
2020-04-10 13:32:42 +02:00
|
|
|
"%~dp0\..\..\..\Prerequisites\MSYS\1.0\bin\cat.exe" "%~dp0\..\..\ReadMe.txt" >> "%OUT_FILE%.txt"
|
2018-04-19 23:35:38 +02:00
|
|
|
echo.>> "%OUT_FILE%.txt"
|
|
|
|
|
|
|
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
|
|
|
echo LICENSE.TXT>> "%OUT_FILE%.txt"
|
|
|
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
|
|
|
echo.>> "%OUT_FILE%.txt"
|
2020-04-10 13:32:42 +02:00
|
|
|
"%~dp0\..\..\..\Prerequisites\MSYS\1.0\bin\cat.exe" "%~dp0\..\..\License.txt" >> "%OUT_FILE%.txt"
|
2018-04-19 23:35:38 +02:00
|
|
|
echo.>> "%OUT_FILE%.txt"
|
|
|
|
|
2014-12-22 22:40:20 +01:00
|
|
|
:: ---------------------------------------------------------------------------
|
2016-10-07 21:40:57 +02:00
|
|
|
:: BUILD INSTALLER
|
2014-12-22 22:40:20 +01:00
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "\n==========================================================================="
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "Creating release packages..."
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
|
2014-12-23 00:23:41 +01:00
|
|
|
|
2014-01-08 21:43:24 +01:00
|
|
|
pushd "%TMP_PATH%"
|
2020-04-10 13:32:42 +02:00
|
|
|
"%~dp0\..\..\..\Prerequisites\InfoZip\zip.exe" -r -9 -z "%OUT_FILE%.zip" "*.*" < "%OUT_FILE%.txt"
|
2014-01-08 21:43:24 +01:00
|
|
|
popd
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2016-12-20 20:53:57 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\NSIS\makensis.exe" "/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"
|
2015-06-25 23:06:50 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to build installer^!\n"
|
2015-06-25 23:06:50 +02:00
|
|
|
pause && exit
|
|
|
|
)
|
2016-10-07 21:40:57 +02:00
|
|
|
|
2018-02-06 20:36:15 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\NSIS\peheader.exe" "%OUT_FILE%.sfx"
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to build installer^!\n"
|
|
|
|
pause && exit
|
|
|
|
)
|
|
|
|
|
2020-04-17 22:11:54 +02:00
|
|
|
call "%~dp0\..\..\..\Prerequisites\SevenZip\7zSDex.cmd" "%OUT_FILE%.sfx" "%OUT_FILE%.exe" "LameXP Setup" "LameXP-Setup-r%VER_LAMEXP_BUILD%"
|
2015-06-25 23:06:50 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to build installer^!\n"
|
2015-06-25 23:06:50 +02:00
|
|
|
pause && exit
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2016-11-23 20:13:21 +01:00
|
|
|
set "VER_FILEVER=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%.%VER_LAMEXP_MINOR_LO%.%VER_LAMEXP_PATCH%"
|
|
|
|
set "VER_PRODUCT=LameXP - Audio Encoder Front-End"
|
2018-04-19 23:35:38 +02:00
|
|
|
"%~dp0\..\..\..\Prerequisites\VerPatch\verpatch.exe" "%OUT_FILE%.exe" "%VER_FILEVER%" /pv "%VER_FILEVER%" /fn /s desc "%VER_PRODUCT%" /s product "%VER_PRODUCT%" /s title "LameXP Installer SFX" /s copyright "Copyright (C) LoRd_MuldeR" /s company "Free Software Foundation" /sc "Git-%GIT_REV_NAME%-r%GIT_REV_NMBR%-%GIT_REV_HASH% [%GIT_REV_DATE%] [%GIT_REV_TIME%]"
|
2016-11-23 20:13:21 +01:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to build installer^!\n"
|
2016-11-23 20:13:21 +01:00
|
|
|
pause && exit
|
|
|
|
)
|
|
|
|
|
2018-02-06 20:36:15 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\NSIS\peheader.exe" "%OUT_FILE%.exe"
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to build installer^!\n"
|
|
|
|
pause && exit
|
|
|
|
)
|
|
|
|
|
2016-10-07 21:40:57 +02:00
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: CLEAN UP
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2012-07-02 01:19:32 +02:00
|
|
|
attrib -R "%TMP_PATH%\*.txt"
|
|
|
|
attrib -R "%TMP_PATH%\*.html"
|
|
|
|
attrib -R "%TMP_PATH%\*.exe"
|
2010-11-11 00:25:23 +01:00
|
|
|
rd /S /Q "%TMP_PATH%"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
for %%i in (zip,exe) do (
|
2016-10-07 21:40:57 +02:00
|
|
|
if not exist "%OUT_FILE%.%%i" (
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nFailed to create release packages^!\n"
|
2014-12-23 00:23:41 +01:00
|
|
|
pause && exit
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2010-11-11 00:25:23 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2010-11-21 23:20:14 +01:00
|
|
|
attrib +R "%OUT_FILE%.zip"
|
2011-10-02 23:32:15 +02:00
|
|
|
attrib +R "%OUT_FILE%.sfx"
|
2010-11-21 23:20:14 +01:00
|
|
|
attrib +R "%OUT_FILE%.exe"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: SIGN OUTPUT FILE
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "\n==========================================================================="
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "Signing output file..."
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
|
2014-12-23 00:23:41 +01:00
|
|
|
|
2018-10-28 16:52:43 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\GnuPG\bin\gpg.exe" -v -u 0x6CF3FA22 -a -o "%OUT_FILE%.exe.sig" --detach-sign "%OUT_FILE%.exe"
|
|
|
|
"%~dp0\..\..\..\Prerequisites\GnuPG\bin\gpg.exe" -v -u 0x5F57E03F -a -o "%OUT_FILE%.exe.sig2" --detach-sign "%OUT_FILE%.exe"
|
2018-12-07 14:10:38 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\GnuPG\bin\gpg.exe" -v -u 0x5F57E03F -a -o "%OUT_FILE%.zip.sig2" --detach-sign "%OUT_FILE%.zip"
|
2017-05-28 20:42:22 +02:00
|
|
|
|
2010-11-29 14:00:27 +01:00
|
|
|
attrib +R "%OUT_FILE%.exe.sig"
|
2017-05-28 20:42:22 +02:00
|
|
|
attrib +R "%OUT_FILE%.exe.sig2"
|
2020-04-17 22:11:54 +02:00
|
|
|
attrib +R "%OUT_FILE%.zip.sig2"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: COMPLETED
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2016-12-20 20:32:59 +01:00
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" green "\n==========================================================================="
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" green "Completed successfully :-)"
|
|
|
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" green "===========================================================================\n"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2010-11-11 00:25:23 +01:00
|
|
|
pause
|