2010-11-10 17:03:01 +01:00
|
|
|
@echo off
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: CLEAR
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2010-11-10 17:03:01 +01:00
|
|
|
set "VER_LAMEXP_MAJOR="
|
|
|
|
set "VER_LAMEXP_MINOR_HI="
|
|
|
|
set "VER_LAMEXP_MINOR_LO="
|
|
|
|
set "VER_LAMEXP_BUILD="
|
2011-04-14 02:21:46 +02:00
|
|
|
set "VER_LAMEXP_TYPE="
|
|
|
|
set "VER_LAMEXP_PATCH="
|
2012-05-25 02:24:44 +02:00
|
|
|
set "VER_LAMEXP_BASENAME="
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: PARSE CONFIG FILE
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
for /f "tokens=2,*" %%s in (%~dp0\..\..\src\Config.h) do (
|
2014-12-22 22:40:20 +01:00
|
|
|
if "%%s"=="VER_LAMEXP_MAJOR" set "VER_LAMEXP_MAJOR=%%~t"
|
2010-11-10 21:39:37 +01:00
|
|
|
if "%%s"=="VER_LAMEXP_MINOR_HI" set "VER_LAMEXP_MINOR_HI=%%~t"
|
|
|
|
if "%%s"=="VER_LAMEXP_MINOR_LO" set "VER_LAMEXP_MINOR_LO=%%~t"
|
2014-12-22 22:40:20 +01:00
|
|
|
if "%%s"=="VER_LAMEXP_BUILD" set "VER_LAMEXP_BUILD=%%~t"
|
|
|
|
if "%%s"=="VER_LAMEXP_TYPE" set "VER_LAMEXP_TYPE=%%~t"
|
|
|
|
if "%%s"=="VER_LAMEXP_PATCH" set "VER_LAMEXP_PATCH=%%~t"
|
2010-11-10 17:03:01 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: CHECK RESULT
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if "%VER_LAMEXP_MAJOR%"=="" goto:version_failure
|
|
|
|
if "%VER_LAMEXP_MINOR_HI%"=="" goto:version_failure
|
|
|
|
if "%VER_LAMEXP_MINOR_LO%"=="" goto:version_failure
|
|
|
|
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
|
2014-12-23 00:23:41 +01:00
|
|
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to set up build date!\n"
|
|
|
|
pause && exit
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: GET RELEASE TYPE
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
:version_success
|
|
|
|
|
2012-05-25 02:24:44 +02:00
|
|
|
set "VER_LAMEXP_BASENAME=LameXP"
|
2012-06-22 15:49:56 +02:00
|
|
|
if "%VER_LAMEXP_TYPE%" == "Alpha" set "VER_LAMEXP_BASENAME=LameXP-ALPHA"
|
2014-12-22 22:40:20 +01:00
|
|
|
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%"
|
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: OUTPUT RESULT
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2014-12-23 00:23:41 +01:00
|
|
|
"%~dp0\..\Utilities\CEcho.exe" yellow "\nLameXP Version: %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%, Build #%VER_LAMEXP_BUILD% (%VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH%)\n"
|