From 4b404e1b70198bf38147b6e01cbb0a4ccb381a9f Mon Sep 17 00:00:00 2001 From: lordmulder Date: Thu, 21 Apr 2011 20:35:03 +0200 Subject: [PATCH] Slightly tweak deployment script. --- etc/Deployment/_date.bat | 17 ++++++++++++----- etc/Deployment/_deploy.bat | 15 +++++++++------ etc/Deployment/_lupdate.bat | 6 +++++- src/Config.h | 2 +- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/etc/Deployment/_date.bat b/etc/Deployment/_date.bat index 9cc76172..44ca5f59 100644 --- a/etc/Deployment/_date.bat +++ b/etc/Deployment/_date.bat @@ -1,6 +1,13 @@ @echo off -set "DATE_TMP=%TEMP%\~date.%RANDOM%.tmp" -"%~dp0\_date.exe" +%%Y-%%m-%%d > "%DATE_TMP%" -set /p OUT_DATE= < "%DATE_TMP%" -del "%DATE_TMP%" -set "DATE_TMP=" +set "ISO_DATE=" +set "LAMEXP_ERROR=1" +REM ------------------------------------------ +if not exist "%~dp0\_date.exe" GOTO:EOF +set "DATE_TEMP_FILE=%TEMP%\~date.%RANDOM%.tmp" +"%~dp0\_date.exe" +%%Y-%%m-%%d > "%DATE_TEMP_FILE%" +set /p "ISO_DATE=" < "%DATE_TEMP_FILE%" +del "%DATE_TEMP_FILE%" +set "DATE_TEMP_FILE=" +echo BUILD DATE: %ISO_DATE% +REM ------------------------------------------ +set "LAMEXP_ERROR=0" diff --git a/etc/Deployment/_deploy.bat b/etc/Deployment/_deploy.bat index 20586c14..8e966e7d 100644 --- a/etc/Deployment/_deploy.bat +++ b/etc/Deployment/_deploy.bat @@ -19,12 +19,15 @@ REM ------------------------------------------ REM :: SETUP BUILD DATE :: REM ------------------------------------------ call "%~dp0\_date.bat" -echo BUILD DATE: %OUT_DATE% +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 "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp" +set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%ISO_DATE%.tmp" set "OBJ_PATH=%~dp0\..\..\obj\%LAMEXP_CONFIG%" set "MOC_PATH=%~dp0\..\..\tmp" set "IPC_PATH=%~dp0\..\..\ipch" @@ -69,10 +72,10 @@ if not "%LAMEXP_ERROR%"=="0" ( GOTO:EOF ) REM ------------------------------------------ -set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%" +set "OUT_FILE=%OUT_PATH%\..\LameXP.%ISO_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" + if exist "!OUT_FILE!.exe" set "OUT_FILE=%OUT_PATH%\..\LameXP.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n" + if exist "!OUT_FILE!.zip" set "OUT_FILE=%OUT_PATH%\..\LameXP.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n" ) REM ------------------------------------------ REM :: DELETE OLD OUTPUT FILE :: @@ -127,7 +130,7 @@ REM ------------------------------------------ REM :: CREATE PACKAGES :: REM ------------------------------------------ "%PATH_SEVENZ%\7z.exe" a -tzip -r "%OUT_FILE%.zip" "%TMP_PATH%\*" -"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%OUT_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%" "%~dp0\..\NSIS\setup.nsi" +"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.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%" "%~dp0\..\NSIS\setup.nsi" rd /S /Q "%TMP_PATH%" REM ------------------------------------------ if not exist "%OUT_FILE%.zip" ( diff --git a/etc/Deployment/_lupdate.bat b/etc/Deployment/_lupdate.bat index 23bc1e3d..a564d9fa 100644 --- a/etc/Deployment/_lupdate.bat +++ b/etc/Deployment/_lupdate.bat @@ -5,12 +5,16 @@ echo Updating Translation files echo ---------------------------------------------------------------- call "%~dp0\_paths.bat" if not "%LAMEXP_ERROR%"=="0" GOTO:EOF +call "%~dp0\_date.bat" +if not "%LAMEXP_ERROR%"=="0" GOTO:EOF +REM ----------------------------------------------------------------- +set "LAMEXP_ERROR=1" REM ----------------------------------------------------------------- call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86 call "%PATH_QTMSVC%\bin\qtenv2.bat" REM ----------------------------------------------------------------- set "LAMEXP_ERROR=1" -set "LST_FILE=%TEMP%\~list.%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%.lst" +set "LST_FILE=%TEMP%\~list.%ISO_DATE%.lst" echo %LST_FILE% REM ----------------------------------------------------------------- del "%LST_FILE%" 2> NUL diff --git a/src/Config.h b/src/Config.h index 21237d3d..610d91a9 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 2 #define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_PATCH 6 -#define VER_LAMEXP_BUILD 453 +#define VER_LAMEXP_BUILD 455 /////////////////////////////////////////////////////////////////////////////// // Tools versions