From e086321dfafd61d3f7d0326b8737cd80ed4eb0e3 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 25 Apr 2011 01:56:53 +0800 Subject: [PATCH] CREATE_PROJECT: Merge with latest version of create_project from the ScummVM repository - Add revision template to base/ folder - Add residual configuration file --- base/internal_version.h | 6 ++ base/internal_version.h.in | 6 ++ devtools/create_project/codeblocks.cpp | 49 +++++---- .../codeblocks/create_project.cbp | 1 + devtools/create_project/config.h | 12 ++- devtools/create_project/create_project.cpp | 59 +++++++---- devtools/create_project/create_project.h | 10 +- devtools/create_project/msbuild.cpp | 86 ++++++++------- devtools/create_project/msbuild.h | 2 +- devtools/create_project/msvc.cpp | 30 +++--- devtools/create_project/msvc.h | 3 +- .../msvc10/create_project.vcxproj | 1 + .../msvc10/create_project.vcxproj.filters | 3 + .../msvc8/create_project.vcproj | 4 + .../msvc9/create_project.vcproj | 4 + devtools/create_project/scripts/postbuild.cmd | 16 ++- devtools/create_project/scripts/prebuild.cmd | 16 ++- devtools/create_project/scripts/revision.vbs | 69 ++++++------ devtools/create_project/visualstudio.cpp | 100 ++++++++++-------- devtools/create_project/visualstudio.h | 2 +- 20 files changed, 285 insertions(+), 194 deletions(-) diff --git a/base/internal_version.h b/base/internal_version.h index 27e05899195..e4c4a728b7b 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -2,6 +2,12 @@ #error This file may only be included by base/version.cpp #endif +// Reads revision number from file +// (this is used when building with Visual Studio) +#ifdef RESIDUAL_INTERNAL_REVISION +#include "internal_revision.h" +#endif + #ifdef RELEASE_BUILD #undef RESIDUAL_REVISION #endif diff --git a/base/internal_version.h.in b/base/internal_version.h.in index 3ff2dca0516..49aef36f958 100644 --- a/base/internal_version.h.in +++ b/base/internal_version.h.in @@ -2,6 +2,12 @@ #error This file may only be included by base/version.cpp #endif +// Reads revision number from file +// (this is used when building with Visual Studio) +#ifdef RESIDUAL_INTERNAL_REVISION +#include "internal_revision.h" +#endif + #ifdef RELEASE_BUILD #undef RESIDUAL_REVISION #endif diff --git a/devtools/create_project/codeblocks.cpp b/devtools/create_project/codeblocks.cpp index af4ede67f5a..8ca139e515b 100644 --- a/devtools/create_project/codeblocks.cpp +++ b/devtools/create_project/codeblocks.cpp @@ -23,6 +23,7 @@ * */ +#include "config.h" #include "codeblocks.h" #include @@ -34,20 +35,20 @@ CodeBlocksProvider::CodeBlocksProvider(StringList &global_warnings, std::map\n" "\n"; - workspace << "\t\n"; + workspace << "\t\n"; writeReferences(workspace); // Note we assume that the UUID map only includes UUIDs for enabled engines! for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) { - if (i->first == "residual") + if (i->first == PROJECT_NAME) continue; workspace << "\t\tfirst << ".cbp\" />\n"; @@ -59,7 +60,7 @@ void CodeBlocksProvider::createWorkspace(const BuildSetup &setup) { // HACK We need to pre-process library names // since the MSVC and mingw precompiled -// librarie have different names :( +// libraries have different names :( std::string processLibraryName(std::string name) { // Remove "_static" in lib name size_t pos = name.find("_static"); @@ -90,16 +91,16 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s "\t\t