Added a more reliable method (hopefully) to generate a proper ISO date in batch.

This commit is contained in:
LoRd_MuldeR 2011-04-21 01:45:07 +02:00
parent 687fa08c5e
commit dd0369cfc0
3 changed files with 11 additions and 1 deletions

6
etc/Deployment/_date.bat Normal file
View File

@ -0,0 +1,6 @@
@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="

BIN
etc/Deployment/_date.exe Normal file

Binary file not shown.

View File

@ -16,10 +16,14 @@ if not "%LAMEXP_REDIST%"=="0" (
set "LAMEXP_REDIST=1" set "LAMEXP_REDIST=1"
) )
REM ------------------------------------------ REM ------------------------------------------
REM :: SETUP BUILD DATE ::
REM ------------------------------------------
call "%~dp0\_date.bat"
echo BUILD DATE: %OUT_DATE%
REM ------------------------------------------
REM :: SETUP PATHS :: REM :: SETUP PATHS ::
REM ------------------------------------------ REM ------------------------------------------
set "OUT_PATH=%~dp0\..\..\bin\%LAMEXP_CONFIG%" set "OUT_PATH=%~dp0\..\..\bin\%LAMEXP_CONFIG%"
set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%"
set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp" set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.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"