diff --git a/etc/Deployment/_deploy.bat b/etc/Deployment/_deploy.bat index 961bb776..97c51969 100644 --- a/etc/Deployment/_deploy.bat +++ b/etc/Deployment/_deploy.bat @@ -1,6 +1,7 @@ @echo off +setlocal ENABLEDELAYEDEXPANSION REM ------------------------------------------ -REM :: SETUP PATHS :: +REM :: SETUP ENVIRONMENT :: REM ------------------------------------------ call _paths.bat if not "%LAMEXP_ERROR%"=="0" ( @@ -15,21 +16,14 @@ if not "%LAMEXP_REDIST%"=="0" ( set "LAMEXP_REDIST=1" ) REM ------------------------------------------ +REM :: SETUP PATHS :: +REM ------------------------------------------ set "OUT_PATH=..\..\bin\%LAMEXP_CONFIG%" set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%" -set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG:_=-%" set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp" set "OBJ_PATH=..\..\obj\%LAMEXP_CONFIG%" set "MOC_PATH=..\..\tmp" REM ------------------------------------------ -REM :: READ VERSION INFO :: -REM ------------------------------------------ -call _version.bat -if not "%LAMEXP_ERROR%"=="0" ( - call _error.bat "FAILD TO READ VERSION INFO!" - GOTO:EOF -) -REM ------------------------------------------ REM :: CLEAN UP :: REM ------------------------------------------ del /Q "%OUT_PATH%\*.exe" @@ -40,6 +34,31 @@ del /Q "%OBJ_PATH%\*.bat" del /Q "%OBJ_PATH%\*.idb" del /Q "%MOC_PATH%\*.cpp" del /Q "%MOC_PATH%\*.h" +REM ------------------------------------------ +REM :: BUILD BINARIES :: +REM ------------------------------------------ +call _build.bat "..\..\LameXP.sln" "%LAMEXP_CONFIG%" +if not "%LAMEXP_ERROR%"=="0" ( + call _error.bat "BUILD HAS FAILED" + GOTO:EOF +) +REM ------------------------------------------ +REM :: READ VERSION INFO :: +REM ------------------------------------------ +call _version.bat +if not "%LAMEXP_ERROR%"=="0" ( + call _error.bat "FAILD TO READ VERSION INFO!" + GOTO:EOF +) +REM ------------------------------------------ +set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%" +for /L %%n in (1, 1, 99) do ( + if exist "!OUT_FILE!.exe" set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n" + if exist "!OUT_FILE!.zip" set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n" +) +REM ------------------------------------------ +REM :: DELETE OLD OUTPUT FILE :: +REM ------------------------------------------ del "%OUT_FILE%.exe" del "%OUT_FILE%.zip" REM ------------------------------------------ @@ -52,14 +71,6 @@ if exist "%OUT_FILE%.zip" ( GOTO:EOF ) REM ------------------------------------------ -REM :: BUILD BINARIES :: -REM ------------------------------------------ -call _build.bat "..\..\LameXP.sln" "%LAMEXP_CONFIG%" -if not "%LAMEXP_ERROR%"=="0" ( - call _error.bat "BUILD HAS FAILED" - GOTO:EOF -) -REM ------------------------------------------ REM :: POST BUILD :: REM ------------------------------------------ rd /S /Q "%TMP_PATH%" @@ -106,6 +117,9 @@ if not exist "%OUT_FILE%.exe" ( GOTO:EOF ) REM ------------------------------------------ +attrib +R "%OUT_FILE%.zip" +attrib +R "%OUT_FILE%.exe" +REM ------------------------------------------ echo. echo BUIDL COMPLETED SUCCESSFULLY :-) echo. diff --git a/src/Config.h b/src/Config.h index b214dbb3..a86790e4 100644 --- a/src/Config.h +++ b/src/Config.h @@ -25,7 +25,7 @@ #define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_LO 0 -#define VER_LAMEXP_BUILD 60 +#define VER_LAMEXP_BUILD 62 #define VER_LAMEXP_SUFFIX TechPreview /*