CREATE_PROJECT: Update revision number support (fixes bug #3280881)

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)
This commit is contained in:
Littleboy 2011-04-24 12:34:57 -04:00
parent 4f708b0212
commit 11b907ebf4
12 changed files with 86 additions and 53 deletions

View file

@ -124,7 +124,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
if (!properties)
error("Could not open \"" + setup.outputDir + '/' + "ScummVM_Global" + getPropertiesExtension() + "\" for writing");
outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix));
outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
properties.close();
properties.open((setup.outputDir + '/' + "ScummVM_Global64" + getPropertiesExtension()).c_str());
@ -143,7 +143,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
x64Defines.push_back("WIN32");
x64Defines.push_back("SDL_BACKEND");
outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix));
outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
}
std::string MSVCProvider::getPreBuildEvent() const {
@ -152,7 +152,7 @@ std::string MSVCProvider::getPreBuildEvent() const {
cmdLine = "@echo off\n"
"echo Executing Pre-Build script...\n"
"echo.\n"
"@call "$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd" "$(SolutionDir)/../.."\n"
"@call "$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd" "$(SolutionDir)/../.." "$(TargetDir)"\n"
"EXIT /B0";
return cmdLine;