Replace existing environment variable based revision number support by a file-based method - Generate a special header file in the build output folder with the current revision number - Include the new header file from internal_version.h when a specific define is set - Update create_project to define SCUMMVM_INTERNAL_REVISION as needed and add the build output folder to the include path - Remove support for git-svn clones in the revision script (not useful anymore after the switch to git)
33 lines
833 B
Batchfile
33 lines
833 B
Batchfile
@echo off
|
|
|
|
REM ---------------------------------------------------------------
|
|
REM -- Pre-Build Script
|
|
REM ---------------------------------------------------------------
|
|
REM
|
|
REM Generate file with revision number
|
|
REM
|
|
REM Expected parameters
|
|
REM Root folder (the source root folder)
|
|
REM Target folder (the build output folder, will be used to copy internal_revision.h)
|
|
|
|
if "%~1"=="" goto error_root
|
|
if "%~2"=="" goto error_target
|
|
|
|
REM Run the revision script
|
|
@call cscript "%~1/devtools/create_project/scripts/revision.vbs" %~1 %~2 1>NUL
|
|
if not %errorlevel% == 0 goto error_script
|
|
goto done
|
|
|
|
:error_root
|
|
echo Invalid root folder (%~1)!
|
|
goto done
|
|
|
|
:error_target
|
|
echo Invalid target folder (%~2)!
|
|
goto done
|
|
|
|
:error_script:
|
|
echo An error occured while running the revision script!
|
|
|
|
:done
|
|
exit /B0
|