Updated deployment scripts.

This commit is contained in:
LoRd_MuldeR 2014-12-22 22:40:20 +01:00
parent 478398fd68
commit cd7fcea711
7 changed files with 272 additions and 184 deletions

View File

@ -1,23 +1,45 @@
@echo off @echo off
set "LAMEXP_ERROR=1"
echo.
echo ---------------------------------------------------------------- echo ----------------------------------------------------------------
echo Solution File: %1 echo Solution File: %1
echo Configuration: %~2 echo Configuration: %~2
echo ---------------------------------------------------------------- echo ----------------------------------------------------------------
echo.
:: ---------------------------------------------------------------------------
:: SETUP PATHS
:: ---------------------------------------------------------------------------
call "%~dp0\_paths.bat" call "%~dp0\_paths.bat"
if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
REM -----------------------------------------------------------------
call "%PATH_MSCDIR%\VC\bin\vcvars32.bat" x86 call "%PATH_MSCDIR%\VC\bin\vcvars32.bat" x86
if exist "%PATH_QTMSVC%\bin\qtenv2.bat" call "%PATH_QTMSVC%\bin\qtenv2.bat"
if exist "%PATH_QTMSVC%\bin\qtvars.bat" call "%PATH_QTMSVC%\bin\qtvars.bat" if exist "%PATH_QTMSVC%\bin\qtenv2.bat" (
REM ----------------------------------------------------------------- call "%PATH_QTMSVC%\bin\qtenv2.bat"
set "LAMEXP_ERROR=1" )
if exist "%PATH_QTMSVC%\bin\qtvars.bat" (
call "%PATH_QTMSVC%\bin\qtvars.bat"
)
:: ---------------------------------------------------------------------------
:: BUILD THE PROJECT
:: ---------------------------------------------------------------------------
msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Clean /verbosity:normal %1 msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Clean /verbosity:normal %1
if not "%ERRORLEVEL%"=="0" GOTO:EOF if not "%ERRORLEVEL%"=="0" (
echo ---------------------------------------------------------------- echo. && echo Build process has failed!
set "LAMEXP_ERROR=1" echo. && pause && exit
)
msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Rebuild /verbosity:normal %1 msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Rebuild /verbosity:normal %1
if not "%ERRORLEVEL%"=="0" (
echo. && echo Build process has failed!
echo. && pause && exit
)
msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Build /verbosity:normal %1 msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Build /verbosity:normal %1
if not "%ERRORLEVEL%"=="0" GOTO:EOF if not "%ERRORLEVEL%"=="0" (
echo ---------------------------------------------------------------- echo. && echo Build process has failed!
set "LAMEXP_ERROR=0" echo. && pause && exit
)

View File

@ -1,12 +1,22 @@
@echo off @echo off
:: ---------------------------------------------------------------------------
:: SETUP BUILD DATE
:: ---------------------------------------------------------------------------
set "ISO_DATE=" set "ISO_DATE="
set "LAMEXP_ERROR=1"
REM ------------------------------------------ if exist "%~dp0\..\Utilities\Date.exe" (
if not exist "%~dp0\..\Utilities\Date.exe" GOTO:EOF for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\..\Utilities\Date.exe" +ISODATE:%%Y-%%m-%%d') do (
for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\..\Utilities\Date.exe" +ISODATE:%%Y-%%m-%%d') do (
if "%%a"=="ISODATE" set "ISO_DATE=%%b" if "%%a"=="ISODATE" set "ISO_DATE=%%b"
)
) )
if "%ISO_DATE%"=="" GOTO:EOF
REM ------------------------------------------ if "%ISO_DATE%"=="" (
echo %ISO_DATE% echo. && echo "Failed to set up build date!"
set "LAMEXP_ERROR=0" echo. && pause && exit
)
echo.
echo Build Date: %ISO_DATE%
echo.

View File

@ -1,43 +1,41 @@
@echo off @echo off
setlocal ENABLEDELAYEDEXPANSION setlocal ENABLEDELAYEDEXPANSION
REM ------------------------------------------
REM :: SETUP ENVIRONMENT :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: SETUP ENVIRONMENT
:: ---------------------------------------------------------------------------
set "_LAMEXP_PATHS_INITIALIZED_="
call "%~dp0\_paths.bat" call "%~dp0\_paths.bat"
if not "%LAMEXP_ERROR%"=="0" ( call "%~dp0\_date.bat"
call "%~dp0\_error.bat" "FAILD TO SETUP PATHS. CHECK YOUR 'BUILDENV.TXT' FILE"
GOTO:EOF
)
REM ------------------------------------------
if "%LAMEXP_CONFIG%"=="" ( if "%LAMEXP_CONFIG%"=="" (
set "LAMEXP_CONFIG=Release" set "LAMEXP_CONFIG=Release"
) )
if not "%LAMEXP_REDIST%"=="0" ( if not "%LAMEXP_REDIST%"=="0" (
set "LAMEXP_REDIST=1" set "LAMEXP_REDIST=1"
) )
REM ------------------------------------------
REM :: SETUP BUILD DATE :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: SETUP PATHS
call "%~dp0\_date.bat" :: ---------------------------------------------------------------------------
if not "%LAMEXP_ERROR%"=="0" (
call "%~dp0\_error.bat" "FAILD TO SETUP BUILD-DATE"
GOTO:EOF
)
REM ------------------------------------------
REM :: SETUP PATHS ::
REM ------------------------------------------
set "OUT_PATH=%~dp0\..\..\bin\%LAMEXP_CONFIG%" set "OUT_PATH=%~dp0\..\..\bin\%LAMEXP_CONFIG%"
set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%ISO_DATE%.%RANDOM%.tmp" set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%ISO_DATE%.%RANDOM%.tmp"
set "OBJ_PATH=%~dp0\..\..\obj\%LAMEXP_CONFIG%" set "OBJ_PATH=%~dp0\..\..\obj\%LAMEXP_CONFIG%"
set "MOC_PATH=%~dp0\..\..\tmp" set "MOC_PATH=%~dp0\..\..\tmp"
set "IPC_PATH=%~dp0\..\..\ipch" set "IPC_PATH=%~dp0\..\..\ipch"
REM ------------------------------------------
if "%LAMEXP_SKIP_BUILD%"=="YES" ( if "%LAMEXP_SKIP_BUILD%"=="YES" (
goto SkipBuildThisTime goto SkipBuildThisTime
) )
REM ------------------------------------------
REM :: CLEAN UP :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: CLEAN UP
:: ---------------------------------------------------------------------------
del /Q "%OUT_PATH%\*.exe" del /Q "%OUT_PATH%\*.exe"
del /Q "%OUT_PATH%\*.dll" del /Q "%OUT_PATH%\*.dll"
del /Q "%OBJ_PATH%\*.obj" del /Q "%OBJ_PATH%\*.obj"
@ -52,84 +50,85 @@ del /Q "%OBJ_PATH%\*.dep"
del /Q "%MOC_PATH%\*.cpp" del /Q "%MOC_PATH%\*.cpp"
del /Q "%MOC_PATH%\*.h" del /Q "%MOC_PATH%\*.h"
del /Q /S "%IPC_PATH%\*.*" del /Q /S "%IPC_PATH%\*.*"
REM ------------------------------------------
REM :: BUILD BINARIES :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: UPDATE LANGUAGE FILES AND DCOS
:: ---------------------------------------------------------------------------
call "%~dp0\_mkdocs.bat"
call "%~dp0\_lupdate.bat" call "%~dp0\_lupdate.bat"
:: ---------------------------------------------------------------------------
:: BUILD THE BINARIES
:: ---------------------------------------------------------------------------
call "%~dp0\_build.bat" "%~dp0\..\..\%PATH_VCPROJ%" "%LAMEXP_CONFIG%" call "%~dp0\_build.bat" "%~dp0\..\..\%PATH_VCPROJ%" "%LAMEXP_CONFIG%"
if not "%LAMEXP_ERROR%"=="0" (
call "%~dp0\_error.bat" "BUILD HAS FAILED"
GOTO:EOF
)
REM ------------------------------------------
:SkipBuildThisTime :SkipBuildThisTime
REM ------------------------------------------
REM :: READ VERSION INFO :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: READ VERSION INFO
:: ---------------------------------------------------------------------------
call "%~dp0\_version.bat" call "%~dp0\_version.bat"
if not "%LAMEXP_ERROR%"=="0" (
call "%~dp0\_error.bat" "FAILD TO READ VERSION INFO!" :: ---------------------------------------------------------------------------
GOTO:EOF :: GENERATE OUTPUT FILE NAME
) :: ---------------------------------------------------------------------------
REM ------------------------------------------
mkdir "%~dp0\..\..\out" 2> NUL mkdir "%~dp0\..\..\out" 2> NUL
set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%"
for /L %%n in (1, 1, 99) do ( for /L %%n in (1, 1, 99) do (
if exist "!OUT_FILE!.exe" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n" if exist "!OUT_FILE!.exe" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
if exist "!OUT_FILE!.zip" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n" if exist "!OUT_FILE!.zip" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
) )
REM ------------------------------------------
REM :: DELETE OLD OUTPUT FILE :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: DELETE OLD OUTPUT FILE
del "%OUT_FILE%.exe" :: ---------------------------------------------------------------------------
del "%OUT_FILE%.sfx"
del "%OUT_FILE%.zip" for %%i in (exe,sfx,zip,txt) do (
del "%OUT_FILE%.txt" del "%OUT_FILE%.%%i" 2> NUL
REM ------------------------------------------ if exist "%OUT_FILE%.%%i" (
if exist "%OUT_FILE%.exe" ( echo. && echo Failed to delete existing output file^^!
call "%~dp0\_error.bat" "FAILD TO DELET EXISTING FILE" echo. && pause && exit
GOTO:EOF )
) )
if exist "%OUT_FILE%.zip" (
call "%~dp0\_error.bat" "FAILD TO DELET EXISTING FILE" :: ---------------------------------------------------------------------------
GOTO:EOF :: POST BUILD OPERATIONS
) :: ---------------------------------------------------------------------------
REM ------------------------------------------
REM :: POST BUILD ::
REM ------------------------------------------
rd /S /Q "%TMP_PATH%" rd /S /Q "%TMP_PATH%"
mkdir "%TMP_PATH%" mkdir "%TMP_PATH%"
copy "%OUT_PATH%\*.exe" "%TMP_PATH%"
REM ------------------------------------------ for %%i in (exe,dll) do (
copy "%OUT_PATH%\*.%%i" "%TMP_PATH%"
)
if "%LAMEXP_REDIST%"=="1" ( if "%LAMEXP_REDIST%"=="1" (
copy "%QTDIR%\bin\QtCore4.dll" "%TMP_PATH%"
copy "%QTDIR%\bin\QtGui4.dll" "%TMP_PATH%"
copy "%QTDIR%\bin\QtXml4.dll" "%TMP_PATH%"
copy "%QTDIR%\bin\QtSvg4.dll" "%TMP_PATH%"
mkdir "%TMP_PATH%\imageformats" mkdir "%TMP_PATH%\imageformats"
for %%i in (Core,Gui,Network,Xml,Svg) do (
copy "%QTDIR%\bin\Qt%%i4.dll" "%TMP_PATH%"
)
copy "%QTDIR%\plugins\imageformats\q???4.dll" "%TMP_PATH%\imageformats" copy "%QTDIR%\plugins\imageformats\q???4.dll" "%TMP_PATH%\imageformats"
for %%i in (100,110,120) do (
if exist %PATH_MSCDIR%\VC\redist\x86\Microsoft.VC%%i.CRT\*.dll" (
copy "%PATH_MSCDIR%\VC\redist\x86\Microsoft.VC%%i.CRT\*.dll" "%TMP_PATH%"
)
)
) )
REM ------------------------------------------
if "%LAMEXP_SKIP_BUILD%"=="YES" ( for %%e in (exe,dll) do (
goto SkipPackingThisTime for %%f in (%TMP_PATH%\*.%%e) do (
)
REM ------------------------------------------
for %%f in ("%TMP_PATH%\*.exe") do (
"%PATH_UPXBIN%\upx.exe" --best "%%f" "%PATH_UPXBIN%\upx.exe" --best "%%f"
)
) )
for %%f in ("%TMP_PATH%\*.dll") do (
"%PATH_UPXBIN%\upx.exe" --best "%%f"
)
REM ------------------------------------------
:SkipPackingThisTime
REM ------------------------------------------
if exist "%~dp0\_postproc.bat" ( if exist "%~dp0\_postproc.bat" (
call "%~dp0\_postproc.bat" "%TMP_PATH%" call "%~dp0\_postproc.bat" "%TMP_PATH%"
) )
REM ------------------------------------------
if "%LAMEXP_REDIST%"=="1" (
copy "..\Redist\*.*" "%TMP_PATH%"
)
copy "%~dp0\..\..\ReadMe.txt" "%TMP_PATH%" copy "%~dp0\..\..\ReadMe.txt" "%TMP_PATH%"
copy "%~dp0\..\..\License.txt" "%TMP_PATH%" copy "%~dp0\..\..\License.txt" "%TMP_PATH%"
copy "%~dp0\..\..\Copying.txt" "%TMP_PATH%" copy "%~dp0\..\..\Copying.txt" "%TMP_PATH%"
@ -137,17 +136,21 @@ copy "%~dp0\..\..\doc\Changelog.html" "%TMP_PATH%"
copy "%~dp0\..\..\doc\Translate.html" "%TMP_PATH%" copy "%~dp0\..\..\doc\Translate.html" "%TMP_PATH%"
copy "%~dp0\..\..\doc\Manual.html" "%TMP_PATH%" copy "%~dp0\..\..\doc\Manual.html" "%TMP_PATH%"
copy "%~dp0\..\..\doc\FAQ.html" "%TMP_PATH%" copy "%~dp0\..\..\doc\FAQ.html" "%TMP_PATH%"
if not "%VER_LAMEXP_TYPE%" == "Final" ( if not "%VER_LAMEXP_TYPE%" == "Final" (
if not "%VER_LAMEXP_TYPE%" == "Hotfix" ( if not "%VER_LAMEXP_TYPE%" == "Hotfix" (
copy "%~dp0\..\..\doc\PRE_RELEASE_INFO.txt" "%TMP_PATH%" copy "%~dp0\..\..\doc\PRE_RELEASE_INFO.txt" "%TMP_PATH%"
) )
) )
attrib +R "%TMP_PATH%\*.txt" attrib +R "%TMP_PATH%\*.txt"
attrib +R "%TMP_PATH%\*.html" attrib +R "%TMP_PATH%\*.html"
attrib +R "%TMP_PATH%\*.exe" attrib +R "%TMP_PATH%\*.exe"
REM ------------------------------------------
REM :: CREATE PACKAGES :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: CREATE PACKAGES
:: ---------------------------------------------------------------------------
"%~dp0\..\Utilities\Echo.exe" LameXP - Audio Encoder Front-End > "%OUT_FILE%.txt" "%~dp0\..\Utilities\Echo.exe" LameXP - Audio Encoder Front-End > "%OUT_FILE%.txt"
"%~dp0\..\Utilities\Echo.exe" v%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO% %VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH% (Build #%VER_LAMEXP_BUILD%)\n >> "%OUT_FILE%.txt" "%~dp0\..\Utilities\Echo.exe" v%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO% %VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH% (Build #%VER_LAMEXP_BUILD%)\n >> "%OUT_FILE%.txt"
"%~dp0\..\Utilities\Echo.exe" Built on %ISO_DATE% at %TIME%\n\n >> "%OUT_FILE%.txt" "%~dp0\..\Utilities\Echo.exe" Built on %ISO_DATE% at %TIME%\n\n >> "%OUT_FILE%.txt"
@ -155,39 +158,43 @@ REM ------------------------------------------
"%~dp0\..\Utilities\Cat.exe" "%~dp0\..\..\ReadMe.txt" >> "%OUT_FILE%.txt" "%~dp0\..\Utilities\Cat.exe" "%~dp0\..\..\ReadMe.txt" >> "%OUT_FILE%.txt"
"%~dp0\..\Utilities\Echo.exe" \n\n---------------------------\nLICENSE.TXT\n---------------------------\n >> "%OUT_FILE%.txt" "%~dp0\..\Utilities\Echo.exe" \n\n---------------------------\nLICENSE.TXT\n---------------------------\n >> "%OUT_FILE%.txt"
"%~dp0\..\Utilities\Cat.exe" "%~dp0\..\..\License.txt" >> "%OUT_FILE%.txt" "%~dp0\..\Utilities\Cat.exe" "%~dp0\..\..\License.txt" >> "%OUT_FILE%.txt"
REM ------------------------------------------
pushd "%TMP_PATH%" 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
REM ------------------------------------------
"%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%.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" "%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"
REM ------------------------------------------
attrib -R "%TMP_PATH%\*.txt" attrib -R "%TMP_PATH%\*.txt"
attrib -R "%TMP_PATH%\*.html" attrib -R "%TMP_PATH%\*.html"
attrib -R "%TMP_PATH%\*.exe" attrib -R "%TMP_PATH%\*.exe"
rd /S /Q "%TMP_PATH%" rd /S /Q "%TMP_PATH%"
REM ------------------------------------------
if not exist "%OUT_FILE%.zip" ( for %%i in (zip,exe) do (
call "%~dp0\_error.bat" "PACKAGING HAS FAILED" if not exist "%OUT_FILE%.zip" (
GOTO:EOF echo. && echo Failed to create release packages^^!
echo. && pause && exit
)
) )
if not exist "%OUT_FILE%.exe" (
call "%~dp0\_error.bat" "PACKAGING HAS FAILED"
GOTO:EOF
)
REM ------------------------------------------
attrib +R "%OUT_FILE%.zip" attrib +R "%OUT_FILE%.zip"
attrib +R "%OUT_FILE%.sfx" attrib +R "%OUT_FILE%.sfx"
attrib +R "%OUT_FILE%.exe" attrib +R "%OUT_FILE%.exe"
REM ------------------------------------------
REM :: CREATE SIGNATURE :: :: ---------------------------------------------------------------------------
REM ------------------------------------------ :: SIGN OUTPUT FILE
:: ---------------------------------------------------------------------------
"%PATH_GNUPG1%\gpg.exe" --detach-sign "%OUT_FILE%.exe" "%PATH_GNUPG1%\gpg.exe" --detach-sign "%OUT_FILE%.exe"
attrib +R "%OUT_FILE%.exe.sig" attrib +R "%OUT_FILE%.exe.sig"
REM ------------------------------------------
:: ---------------------------------------------------------------------------
:: COMPLETED
:: ---------------------------------------------------------------------------
echo. echo.
echo BUIDL COMPLETED SUCCESSFULLY :-) echo BUIDL COMPLETED SUCCESSFULLY :-)
echo. echo.
REM ------------------------------------------
pause pause

View File

@ -1,5 +0,0 @@
@echo off
echo.
echo %~1 !!!
echo.
pause

View File

@ -1,43 +1,69 @@
@echo off @echo off
set "LAMEXP_ERROR=1" setlocal ENABLEDELAYEDEXPANSION
echo.
echo ---------------------------------------------------------------- echo ----------------------------------------------------------------
echo Updating Translation files echo Updating Translation Files
echo ---------------------------------------------------------------- echo ----------------------------------------------------------------
echo.
:: ---------------------------------------------------------------------------
:: SETUP PATHS
:: ---------------------------------------------------------------------------
call "%~dp0\_paths.bat" call "%~dp0\_paths.bat"
if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
REM -----------------------------------------------------------------
set "LAMEXP_ERROR=1"
REM -----------------------------------------------------------------
call "%PATH_MSCDIR%\VC\bin\vcvars32.bat" x86 call "%PATH_MSCDIR%\VC\bin\vcvars32.bat" x86
if exist "%PATH_QTMSVC%\bin\qtenv2.bat" call "%PATH_QTMSVC%\bin\qtenv2.bat"
if exist "%PATH_QTMSVC%\bin\qtvars.bat" call "%PATH_QTMSVC%\bin\qtvars.bat" if exist "%PATH_QTMSVC%\bin\qtenv2.bat" (
REM ----------------------------------------------------------------- call "%PATH_QTMSVC%\bin\qtenv2.bat"
set "LAMEXP_ERROR=1" )
if exist "%PATH_QTMSVC%\bin\qtvars.bat" (
call "%PATH_QTMSVC%\bin\qtvars.bat"
)
:: ---------------------------------------------------------------------------
:: GENERATE THE FILE LIST
:: ---------------------------------------------------------------------------
set "LST_FILE=%TEMP%\~list.%RANDOM%%RANDOM%.tmp" set "LST_FILE=%TEMP%\~list.%RANDOM%%RANDOM%.tmp"
echo %LST_FILE% echo %LST_FILE%
REM -----------------------------------------------------------------
del "%LST_FILE%" 2> NUL del "%LST_FILE%" 2> NUL
for %%f in ("%~dp0\..\..\gui\*.ui") do ( for %%f in ("%~dp0\..\..\gui\*.ui") do (
echo %%f >> "%LST_FILE%" echo %%f >> "%LST_FILE%"
) )
for %%f in ("%~dp0\..\..\src\*.cpp") do ( for %%e in (cpp,h) do (
for %%f in ("%~dp0\..\..\src\*.%%e") do (
echo %%f >> "%LST_FILE%" echo %%f >> "%LST_FILE%"
)
) )
for %%f in ("%~dp0\..\..\src\*.h") do (
echo %%f >> "%LST_FILE%" :: ---------------------------------------------------------------------------
) :: UPDATE TS FILES
REM ----------------------------------------------------------------- :: ---------------------------------------------------------------------------
for %%f in ("%~dp0\..\Translation\*.ts") do ( for %%f in ("%~dp0\..\Translation\*.ts") do (
del %%f.bak 2> NUL del %%f.bak 2> NUL
copy %%f %%f.bak copy %%f %%f.bak
lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f
if not "!ERRORLEVEL!"=="0" (
echo. && echo Something went wrong^^!
echo. && pause && exit
)
) )
lupdate.exe "@%LST_FILE%" -no-obsolete -pluralonly -ts "%~dp0\..\Translation\LameXP_EN.ts" lupdate.exe "@%LST_FILE%" -no-obsolete -pluralonly -ts "%~dp0\..\Translation\LameXP_EN.ts"
del "%LST_FILE%" del "%LST_FILE%"
echo ----------------------------------------------------------------
:: ---------------------------------------------------------------------------
:: GENERATE QM FILES
:: ---------------------------------------------------------------------------
for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do ( for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do (
lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm" lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm"
if not "!ERRORLEVEL!"=="0" (
echo. && echo Something went wrong^^!
echo. && pause && exit
)
) )
echo ----------------------------------------------------------------
set "LST_FILE="
set "LAMEXP_ERROR=0"

View File

@ -1,6 +1,12 @@
@echo off @echo off
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
echo.
echo ----------------------------------------------------------------
echo Building software documentation
echo ----------------------------------------------------------------
echo.
:: ------------------------------------------ :: ------------------------------------------
:: Setup Paths :: Setup Paths
:: ------------------------------------------ :: ------------------------------------------
@ -11,16 +17,14 @@ call "%~dp0\_paths.bat"
:: Create Documents :: Create Documents
:: ------------------------------------------ :: ------------------------------------------
echo ----------------------------------------------------------------
echo Building software documentation
echo ----------------------------------------------------------------
echo.
for %%i in ("%~dp0\..\..\doc\*.md") do ( for %%i in ("%~dp0\..\..\doc\*.md") do (
echo PANDOC: %%~nxi echo PANDOC: %%~nxi
"%PATH_PANDOC%\pandoc.exe" --from markdown_github+pandoc_title_block --to html5 --toc -N --standalone -H "%~dp0\..\Style\style.css" "%%~i" --output "%%~dpni.html" "%PATH_PANDOC%\pandoc.exe" --from markdown_github+pandoc_title_block --to html5 --toc -N --standalone -H "%~dp0\..\Style\style.css" "%%~i" --output "%%~dpni.html"
echo. echo.
if not "!ERRORLEVEL!"=="0" goto:eof if "!ERRORLEVEL!"=="0" (
echo. && echo Creating the document has failed^^!
echo. && pause && exit
)
) )
echo. echo.

View File

@ -1,6 +1,9 @@
@echo off @echo off
set "LAMEXP_ERROR=1"
REM ------------------------------------------ :: ---------------------------------------------------------------------------
:: CLEAR
:: ---------------------------------------------------------------------------
set "VER_LAMEXP_MAJOR=" set "VER_LAMEXP_MAJOR="
set "VER_LAMEXP_MINOR_HI=" set "VER_LAMEXP_MINOR_HI="
set "VER_LAMEXP_MINOR_LO=" set "VER_LAMEXP_MINOR_LO="
@ -8,7 +11,11 @@ set "VER_LAMEXP_BUILD="
set "VER_LAMEXP_TYPE=" set "VER_LAMEXP_TYPE="
set "VER_LAMEXP_PATCH=" set "VER_LAMEXP_PATCH="
set "VER_LAMEXP_BASENAME=" set "VER_LAMEXP_BASENAME="
REM ------------------------------------------
:: ---------------------------------------------------------------------------
:: PARSE CONFIG FILE
:: ---------------------------------------------------------------------------
for /f "tokens=2,*" %%s in (%~dp0\..\..\src\Config.h) do ( for /f "tokens=2,*" %%s in (%~dp0\..\..\src\Config.h) do (
if "%%s"=="VER_LAMEXP_MAJOR" set "VER_LAMEXP_MAJOR=%%~t" if "%%s"=="VER_LAMEXP_MAJOR" set "VER_LAMEXP_MAJOR=%%~t"
if "%%s"=="VER_LAMEXP_MINOR_HI" set "VER_LAMEXP_MINOR_HI=%%~t" if "%%s"=="VER_LAMEXP_MINOR_HI" set "VER_LAMEXP_MINOR_HI=%%~t"
@ -17,22 +24,39 @@ for /f "tokens=2,*" %%s in (%~dp0\..\..\src\Config.h) do (
if "%%s"=="VER_LAMEXP_TYPE" set "VER_LAMEXP_TYPE=%%~t" if "%%s"=="VER_LAMEXP_TYPE" set "VER_LAMEXP_TYPE=%%~t"
if "%%s"=="VER_LAMEXP_PATCH" set "VER_LAMEXP_PATCH=%%~t" if "%%s"=="VER_LAMEXP_PATCH" set "VER_LAMEXP_PATCH=%%~t"
) )
REM ------------------------------------------
set "LAMEXP_ERROR=1" :: ---------------------------------------------------------------------------
if "%VER_LAMEXP_MAJOR%"=="" GOTO:EOF :: CHECK RESULT
if "%VER_LAMEXP_MINOR_HI%"=="" GOTO:EOF :: ---------------------------------------------------------------------------
if "%VER_LAMEXP_MINOR_LO%"=="" GOTO:EOF
if "%VER_LAMEXP_BUILD%"=="" GOTO:EOF if "%VER_LAMEXP_MAJOR%"=="" goto:version_failure
if "%VER_LAMEXP_TYPE%"=="" GOTO:EOF if "%VER_LAMEXP_MINOR_HI%"=="" goto:version_failure
if "%VER_LAMEXP_PATCH%"=="" GOTO:EOF if "%VER_LAMEXP_MINOR_LO%"=="" goto:version_failure
REM ------------------------------------------ if "%VER_LAMEXP_BUILD%"=="" goto:version_failure
if "%VER_LAMEXP_TYPE%"=="" goto:version_failure
if "%VER_LAMEXP_PATCH%"=="" goto:version_failure
goto:version_success
:version_failure
echo. && echo "Failed to set up build date!"
echo. && pause && exit
:: ---------------------------------------------------------------------------
:: GET RELEASE TYPE
:: ---------------------------------------------------------------------------
:version_success
set "VER_LAMEXP_BASENAME=LameXP" set "VER_LAMEXP_BASENAME=LameXP"
if "%VER_LAMEXP_TYPE%" == "Alpha" set "VER_LAMEXP_BASENAME=LameXP-ALPHA" if "%VER_LAMEXP_TYPE%" == "Alpha" set "VER_LAMEXP_BASENAME=LameXP-ALPHA"
if "%VER_LAMEXP_TYPE%" == "Beta" set "VER_LAMEXP_BASENAME=LameXP-BETA" if "%VER_LAMEXP_TYPE%" == "Beta" set "VER_LAMEXP_BASENAME=LameXP-BETA"
if "%VER_LAMEXP_TYPE%" == "RC" set "VER_LAMEXP_BASENAME=LameXP-RC%VER_LAMEXP_PATCH%" if "%VER_LAMEXP_TYPE%" == "RC" set "VER_LAMEXP_BASENAME=LameXP-RC%VER_LAMEXP_PATCH%"
REM ------------------------------------------
echo LameXP Version: :: ---------------------------------------------------------------------------
echo %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%, Build #%VER_LAMEXP_BUILD% (%VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH%) :: OUTPUT RESULT
:: ---------------------------------------------------------------------------
echo.
echo LameXP Version: %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%, Build #%VER_LAMEXP_BUILD% (%VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH%)
echo. echo.
REM ------------------------------------------
set "LAMEXP_ERROR=0"