From b77f42b3b135f419a01705ec9a67d8a2ee9403f8 Mon Sep 17 00:00:00 2001 From: Pawel Kolodziejski Date: Tue, 17 Apr 2012 14:45:22 +0200 Subject: DEVTOOLS: take usage of config.h for xcode; few small updates --- devtools/create_project/config.h | 1 - devtools/create_project/create_project.cpp | 6 ++-- devtools/create_project/xcode.cpp | 49 +++++++++++++++--------------- 3 files changed, 29 insertions(+), 27 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h index fecd95691e..20c1391cef 100644 --- a/devtools/create_project/config.h +++ b/devtools/create_project/config.h @@ -28,7 +28,6 @@ #define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable #define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION" -#define HAS_VIDEO_FOLDER 1 //#define ADDITIONAL_LIBRARY "" #define NEEDS_RTTI 0 diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 61c609be67..062c03b648 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -575,7 +575,9 @@ int main(int argc, char *argv[]) { globalWarnings.push_back("-Wwrite-strings"); // The following are not warnings at all... We should consider adding them to // a different list of parameters. +#if !NEEDS_RTTI globalWarnings.push_back("-fno-rtti"); +#endif globalWarnings.push_back("-fno-exceptions"); globalWarnings.push_back("-fcheck-new"); @@ -1213,9 +1215,7 @@ void ProjectProvider::createProject(const BuildSetup &setup) { createModuleList(setup.srcDir + "/gui", setup.defines, in, ex); createModuleList(setup.srcDir + "/audio", setup.defines, in, ex); createModuleList(setup.srcDir + "/audio/softsynth/mt32", setup.defines, in, ex); -#if HAS_VIDEO_FOLDER createModuleList(setup.srcDir + "/video", setup.defines, in, ex); -#endif // Resource files in.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico"); @@ -1225,6 +1225,8 @@ void ProjectProvider::createProject(const BuildSetup &setup) { in.push_back(setup.srcDir + "/AUTHORS"); in.push_back(setup.srcDir + "/COPYING"); in.push_back(setup.srcDir + "/COPYING.LGPL"); + in.push_back(setup.srcDir + "/COPYING.BSD"); + in.push_back(setup.srcDir + "/COPYING.FREEFONT"); in.push_back(setup.srcDir + "/COPYRIGHT"); in.push_back(setup.srcDir + "/NEWS"); in.push_back(setup.srcDir + "/README"); diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index eb51ab3da1..39470f4e19 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -20,6 +20,7 @@ * */ +#include "config.h" #include "xcode.h" #include @@ -86,34 +87,34 @@ XCodeProvider::XCodeProvider(StringList &global_warnings, std::mapaddProperty("dependencies", "", "", SettingsNoValue|SettingsAsList); target->addProperty("name", _targets[i], "", SettingsNoValue|SettingsQuoteVariable); - target->addProperty("productName", "scummvm", "", SettingsNoValue); - target->addProperty("productReference", getHash("PBXFileReference_ScummVM.app_" + _targets[i]), "ScummVM.app", SettingsNoValue); + target->addProperty("productName", PROJECT_NAME, "", SettingsNoValue); + target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", SettingsNoValue); target->addProperty("productType", "com.apple.product-type.application", "", SettingsNoValue|SettingsQuoteVariable); _nativeTarget.add(target); @@ -405,7 +406,7 @@ void XCodeProvider::setupProject() { Object *project = new Object(this, "PBXProject", "PBXProject", "PBXProject", "", "Project object"); - project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"scummvm\"", SettingsNoValue); + project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", SettingsNoValue); project->addProperty("compatibilityVersion", "Xcode 3.2", "", SettingsNoValue|SettingsQuoteVariable); project->addProperty("developmentRegion", "English", "", SettingsNoValue); project->addProperty("hasScannedForEncodings", "1", "", SettingsNoValue); @@ -495,8 +496,8 @@ void XCodeProvider::setupResourcesBuildPhase() { } // Add custom files depending on the target - if (_targets[i] == "ScummVM-OS X") { - files.settings[getHash("PBXResources_scummvm.icns")] = Setting("", "scummvm.icns in Resources", SettingsNoValue, 0, 6); + if (_targets[i] == PROJECT_DESCRIPTION "-OS X") { + files.settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", SettingsNoValue, 0, 6); // Remove 2 iphone icon files files.settings.erase(getHash("PBXResources_Default.png")); @@ -526,7 +527,7 @@ void XCodeProvider::setupBuildConfiguration() { // ****************************************/ // Debug - Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_ScummVM-iPhone_Debug", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Debug", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property iPhone_Debug; ADD_SETTING_QUOTE(iPhone_Debug, "ARCHS", "$(ARCHS_UNIVERSAL_IPHONE_OS)"); ADD_SETTING_QUOTE(iPhone_Debug, "CODE_SIGN_IDENTITY", "iPhone Developer"); @@ -558,7 +559,7 @@ void XCodeProvider::setupBuildConfiguration() { ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, SettingsAsList, 5); ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES"); ADD_SETTING(iPhone_Debug, "PREBINDING", "NO"); - ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", "ScummVM"); + ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION); ADD_SETTING_QUOTE(iPhone_Debug, "PROVISIONING_PROFILE", "EF590570-5FAC-4346-9071-D609DE2B28D8"); ADD_SETTING_QUOTE_VAR(iPhone_Debug, "PROVISIONING_PROFILE[sdk=iphoneos*]", ""); ADD_SETTING(iPhone_Debug, "SDKROOT", "iphoneos4.0"); @@ -568,7 +569,7 @@ void XCodeProvider::setupBuildConfiguration() { iPhone_Debug_Object->properties["buildSettings"] = iPhone_Debug; // Release - Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_ScummVM-iPhone_Release", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); + Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property iPhone_Release(iPhone_Debug); ADD_SETTING(iPhone_Release, "GCC_OPTIMIZATION_LEVEL", "3"); ADD_SETTING(iPhone_Release, "COPY_PHASE_STRIP", "YES"); @@ -586,7 +587,7 @@ void XCodeProvider::setupBuildConfiguration() { ****************************************/ // Debug - Object *scummvm_Debug_Object = new Object(this, "XCBuildConfiguration_scummvm_Debug", "scummvm", "XCBuildConfiguration", "PBXProject", "Debug"); + Object *scummvm_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Debug", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Debug"); Property scummvm_Debug; ADD_SETTING(scummvm_Debug, "ALWAYS_SEARCH_USER_PATHS", "NO"); ADD_SETTING_QUOTE(scummvm_Debug, "ARCHS", "$(ARCHS_STANDARD_32_BIT)"); @@ -623,7 +624,7 @@ void XCodeProvider::setupBuildConfiguration() { scummvm_Debug_Object->properties["buildSettings"] = scummvm_Debug; // Release - Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_scummvm_Release", "scummvm", "XCBuildConfiguration", "PBXProject", "Release"); + Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Release", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Release"); Property scummvm_Release(scummvm_Debug); REMOVE_SETTING(scummvm_Release, "GCC_C_LANGUAGE_STANDARD"); // Not sure why we remove that, or any of the other warnings REMOVE_SETTING(scummvm_Release, "GCC_WARN_ABOUT_RETURN_TYPE"); @@ -641,7 +642,7 @@ void XCodeProvider::setupBuildConfiguration() { ****************************************/ // Debug - Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_ScummVM-OSX_Debug", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Debug", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property scummvmOSX_Debug; ADD_SETTING_QUOTE(scummvmOSX_Debug, "ARCHS", "$(NATIVE_ARCH)"); ADD_SETTING(scummvmOSX_Debug, "COMPRESS_PNG_FILES", "NO"); @@ -687,13 +688,13 @@ void XCodeProvider::setupBuildConfiguration() { scummvmOSX_LdFlags.push_back("-lz"); ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, SettingsAsList, 5); ADD_SETTING(scummvmOSX_Debug, "PREBINDING", "NO"); - ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", "ScummVM"); + ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION); scummvmOSX_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); scummvmOSX_Debug_Object->properties["buildSettings"] = scummvmOSX_Debug; // Release - Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_ScummVMOSX_Release", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); + Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property scummvmOSX_Release(scummvmOSX_Debug); ADD_SETTING(scummvmOSX_Release, "COPY_PHASE_STRIP", "YES"); REMOVE_SETTING(scummvmOSX_Release, "GCC_DYNAMIC_NO_PIC"); @@ -711,7 +712,7 @@ void XCodeProvider::setupBuildConfiguration() { ****************************************/ // Debug - Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_ScummVM-Simulator_Debug", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Debug", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property scummvmSimulator_Debug(iPhone_Debug); ADD_SETTING_QUOTE(scummvmSimulator_Debug, "FRAMEWORK_SEARCH_PATHS", "$(inherited)"); ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); @@ -722,7 +723,7 @@ void XCodeProvider::setupBuildConfiguration() { scummvmSimulator_Debug_Object->properties["buildSettings"] = scummvmSimulator_Debug; // Release - Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_ScummVM-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); + Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property scummvmSimulator_Release(scummvmSimulator_Debug); ADD_SETTING(scummvmSimulator_Release, "COPY_PHASE_STRIP", "YES"); REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC"); -- cgit v1.2.3 From c638730fbcbcfff5fb86b36b5331794672944bf9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 18 Apr 2012 11:36:56 +0200 Subject: BUILD: Move list of engines out of configure The new file engines/configure.engines is currently manually created and maintained, but could be regenerated by a script in the future. --- devtools/create_project/create_project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 062c03b648..293cc0b2de 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -693,7 +693,7 @@ bool parseEngine(const std::string &line, EngineDesc &engine); } // End of anonymous namespace EngineDescList parseConfigure(const std::string &srcDir) { - std::string configureFile = srcDir + "/configure"; + std::string configureFile = srcDir + "/engines/configure.engines"; std::ifstream configure(configureFile.c_str()); if (!configure) -- cgit v1.2.3 From ec1070678caa1070e3d229a80f77ad78a8360b33 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 2 May 2012 20:22:04 +0100 Subject: CREATE_PROJECT: Fix tool help output to reflect command line changes. --- devtools/create_project/create_project.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 293cc0b2de..df220f0934 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -654,14 +654,14 @@ void displayHelp(const char *exe) { "\n" "Engines settings:\n" " --list-engines list all available engines and their default state\n" - " --enable-engine enable building of the engine with the name \"engine\"\n" - " --disable-engine disable building of the engine with the name \"engine\"\n" + " --enable-engine= enable building of the engine with the name \"name\"\n" + " --disable-engine= disable building of the engine with the name \"name\"\n" " --enable-all-engines enable building of all engines\n" " --disable-all-engines disable building of all engines\n" "\n" "Optional features settings:\n" - " --enable-name enable inclusion of the feature \"name\"\n" - " --disable-name disable inclusion of the feature \"name\"\n" + " --enable- enable inclusion of the feature \"name\"\n" + " --disable- disable inclusion of the feature \"name\"\n" "\n" " There are the following features available:\n" "\n"; -- cgit v1.2.3 From ac20e271730462aeb1006683a22aca2b9ab25f66 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 23:11:17 +1000 Subject: CREATE_PROJECT: Updated MSVC scummvm.vcproj generation to handle coroutine compilation properly --- devtools/create_project/visualstudio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index a0fd239db4..9bf031704e 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -144,7 +144,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: void VisualStudioProvider::outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const std::string &platform, const std::string &props, const bool isWin32) { project << "\t\t\n" - "\t\t\t\n" + "\t\t\t\n" "\t\t\t\n"; -- cgit v1.2.3 From 9feac7215efe42efe615ceac0c7b1cc8eb11f68c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 20:57:59 +0300 Subject: CREATE_PROJECT: Disable edit and continue in the scummvm project Edit and continue is not compatible with the coroutine code. Previously, it was disabled in the tinsel project only, but now that the coroutine code has been moved into common, we need to disable edit and continue in the scummvm project instead --- devtools/create_project/msbuild.cpp | 4 ++-- devtools/create_project/visualstudio.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index f8768ecc73..dfd3f1d1c7 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -235,7 +235,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s std::map::iterator warningsIterator = _projectWarnings.find(name); // Nothing to add here, move along! - if (!setup.devTools && name != setup.projectName && name != "sword25" && name != "tinsel" && name != "grim" && warningsIterator == _projectWarnings.end()) + if (!setup.devTools && name != setup.projectName && name != "sword25" && name != "scummvm" && name != "grim" && warningsIterator == _projectWarnings.end()) return; std::string warnings = ""; @@ -250,7 +250,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { project << "\t\t\tfalse\n"; } else { - if (name == "tinsel" && !isRelease) + if (name == "scummvm" && !isRelease) project << "\t\t\tProgramDatabase\n"; if (warningsIterator != _projectWarnings.end()) diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 9bf031704e..62b30ddcd0 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -110,7 +110,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == "tinsel" ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (name == "scummvm" ? "DebugInformationFormat=\"3\" " : ""); toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); -- cgit v1.2.3 From 478fd0ed2957a766df2860c66fa476aa3665fc8f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 24 Jun 2012 18:17:47 +0200 Subject: CREATE_PROJECT: Clarify license on imported code License confirmed by personal email by littleboy. This clarification was requested in bug #3527268. --- devtools/create_project/xcode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 39470f4e19..9784bb0bf5 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -871,7 +871,9 @@ std::string XCodeProvider::writeProperty(const std::string &variable, Property & std::string XCodeProvider::writeSetting(const std::string &variable, std::string value, std::string comment, int flags, int indent) const { return writeSetting(variable, Setting(value, comment, flags, indent)); } -// Heavily modified (not in a good way) function, imported from QMake XCode project generator (licensed under the QT license) + +// Heavily modified (not in a good way) function, imported from the QMake +// XCode project generator pbuilder_pbx.cpp, writeSettings() (under LGPL 2.1) std::string XCodeProvider::writeSetting(const std::string &variable, const Setting &setting) const { std::string output; const std::string quote = (setting.flags & SettingsNoQuote) ? "" : "\""; -- cgit v1.2.3 From 0c84dc1ec94771e5bb4ea68049b0cd94d86fb789 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 10 Jul 2012 23:39:54 -0400 Subject: CREATE_PROJECT: Add Visual Studio 2012 project --- devtools/create_project/msvc11/create_project.sln | 20 ++++ .../create_project/msvc11/create_project.vcxproj | 129 +++++++++++++++++++++ .../msvc11/create_project.vcxproj.filters | 71 ++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 devtools/create_project/msvc11/create_project.sln create mode 100644 devtools/create_project/msvc11/create_project.vcxproj create mode 100644 devtools/create_project/msvc11/create_project.vcxproj.filters (limited to 'devtools/create_project') diff --git a/devtools/create_project/msvc11/create_project.sln b/devtools/create_project/msvc11/create_project.sln new file mode 100644 index 0000000000..1552c9f502 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_project", "create_project.vcxproj", "{CF177559-077D-4A08-AABE-BE0FD35F6C63}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.Build.0 = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.ActiveCfg = Release|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj new file mode 100644 index 0000000000..5947211e35 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.vcxproj @@ -0,0 +1,129 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {CF177559-077D-4A08-AABE-BE0FD35F6C63} + create_project + $(VCTargetsPath11) + + + + Application + MultiByte + true + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + EditAndContinue + false + 4003;4512;4127 + + + Rpcrt4.lib;%(AdditionalDependencies) + true + MachineX86 + false + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + MaxSpeed + true + MultiThreadedDLL + true + Level3 + ProgramDatabase + 4003;4512;4127 + + + Rpcrt4.lib;%(AdditionalDependencies) + true + true + true + MachineX86 + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/devtools/create_project/msvc11/create_project.vcxproj.filters b/devtools/create_project/msvc11/create_project.vcxproj.filters new file mode 100644 index 0000000000..b4f0b18774 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.vcxproj.filters @@ -0,0 +1,71 @@ + + + + + {2e3580c8-ec3a-4c81-8351-b668c668db2a} + + + {31aaf58c-d3cb-4ed6-8eca-163b4a9b31a6} + + + {f980f6fb-41b6-4161-b035-58b200c85cad} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + scripts + + + scripts + + + scripts + + + scripts + + + -- cgit v1.2.3 From 4e0f6d346fe3c05157fa89c7881c2050e497763a Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 00:43:54 -0400 Subject: CREATE_PROJECT: Properly disable Edit and Continue in Debug mode --- devtools/create_project/msbuild.cpp | 8 ++++---- devtools/create_project/visualstudio.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index dfd3f1d1c7..a82140c2d3 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -249,11 +249,11 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s // Compile configuration if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { project << "\t\t\tfalse\n"; - } else { - if (name == "scummvm" && !isRelease) - project << "\t\t\tProgramDatabase\n"; - if (warningsIterator != _projectWarnings.end()) + if (name == setup.projectName && !isRelease) + project << "\t\t\tProgramDatabase\n"; + } else { + if (warningsIterator != _projectWarnings.end()) project << "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n"; } diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 62b30ddcd0..c301e78ad1 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -110,7 +110,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == "scummvm" ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (name == setup.projectName ? "DebugInformationFormat=\"3\" " : ""); toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); -- cgit v1.2.3 From d86c0a44f8452261e7d1e330edf2449642b056fd Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 01:08:22 -0400 Subject: CREATE_PROJECT: Add support for Visual Studio 2012 project creation --- devtools/create_project/create_project.cpp | 3 ++- devtools/create_project/msbuild.cpp | 24 ++++++++++++++-------- .../create_project/msvc11/create_project.vcxproj | 2 ++ 3 files changed, 20 insertions(+), 9 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index df220f0934..c96b83414a 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { msvcVersion = atoi(argv[++i]); - if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10) { + if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11) { std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n"; return -1; } @@ -643,6 +643,7 @@ void displayHelp(const char *exe) { " 8 stands for \"Visual Studio 2005\"\n" " 9 stands for \"Visual Studio 2008\"\n" " 10 stands for \"Visual Studio 2010\"\n" + " 11 stands for \"Visual Studio 2012\"\n" " The default is \"9\", thus \"Visual Studio 2008\"\n" " --build-events Run custom build events as part of the build\n" " (default: false)\n" diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index a82140c2d3..90a5e3c15b 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -46,7 +46,13 @@ const char *MSBuildProvider::getPropertiesExtension() { } int MSBuildProvider::getVisualStudioVersion() { - return 2010; + if (_version == 10) + return 2010; + + if (_version == 11) + return 2012; + + error("Unsupported version passed to getVisualStudioVersion"); } namespace { @@ -58,9 +64,10 @@ inline void outputConfiguration(std::ostream &project, const std::string &config "\t\t\n"; } -inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config) { +inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, int version) { project << "\t\n" "\t\t" << ((name == setup.projectName || setup.devTools) ? "Application" : "StaticLibrary") << "\n" + "\t\tv" << version << "0" "\t\n"; } @@ -98,17 +105,18 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri "\t\t{" << uuid << "}\n" "\t\t" << name << "\n" "\t\tWin32Proj\n" + "\t\t$(VCTargetsPath11)\n" "\t\n"; // Shared configuration project << "\t\n"; - outputConfigurationType(setup, project, name, "Release|Win32"); - outputConfigurationType(setup, project, name, "Analysis|Win32"); - outputConfigurationType(setup, project, name, "Debug|Win32"); - outputConfigurationType(setup, project, name, "Release|x64"); - outputConfigurationType(setup, project, name, "Analysis|x64"); - outputConfigurationType(setup, project, name, "Debug|x64"); + outputConfigurationType(setup, project, name, "Release|Win32", _version); + outputConfigurationType(setup, project, name, "Analysis|Win32", _version); + outputConfigurationType(setup, project, name, "Debug|Win32", _version); + outputConfigurationType(setup, project, name, "Release|x64", _version); + outputConfigurationType(setup, project, name, "Analysis|x64", _version); + outputConfigurationType(setup, project, name, "Debug|x64", _version); project << "\t\n" "\t\n" diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj index 5947211e35..c87461c049 100644 --- a/devtools/create_project/msvc11/create_project.vcxproj +++ b/devtools/create_project/msvc11/create_project.vcxproj @@ -63,6 +63,7 @@ @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" @@ -89,6 +90,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" -- cgit v1.2.3 From 4e832ff947dcb998d76a33ccf86682e75c237fe1 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 01:19:55 -0400 Subject: CREATE_PROJECT: Add freetype dll to copied files in postbuild script --- devtools/create_project/scripts/postbuild.cmd | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools/create_project') diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index dd52c0217c..d78119d058 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -24,6 +24,7 @@ echo Copying data files echo. xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1 xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1 if "%~5"=="0" goto done -- cgit v1.2.3 From 51352b32f15d9a919e9b7a7d3b5a92e31384e9f4 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 12:34:12 -0400 Subject: CREATE_PROJECT: Disable SAFESEH in debug mode (for edit and continue) --- devtools/create_project/msbuild.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 90a5e3c15b..c797770955 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -67,7 +67,7 @@ inline void outputConfiguration(std::ostream &project, const std::string &config inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, int version) { project << "\t\n" "\t\t" << ((name == setup.projectName || setup.devTools) ? "Application" : "StaticLibrary") << "\n" - "\t\tv" << version << "0" + "\t\tv" << version << "0\n" "\t\n"; } @@ -403,6 +403,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\n" "\t\t\n" "\t\t\ttrue\n" + "\t\t\tfalse\n" "\t\t\tlibcmt.lib;%(IgnoreSpecificDefaultLibraries)\n"; } -- cgit v1.2.3 From 67751f77c8abae0f6326cb0daec67cd6dd272c7d Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 16:33:41 -0400 Subject: CREATE_PROJECT: Output Groups and File references in XCode provider --- devtools/create_project/create_project.cpp | 26 ++++++++------------- devtools/create_project/create_project.h | 8 +++++++ devtools/create_project/xcode.cpp | 36 ++++++++++++++++++++++++------ 3 files changed, 46 insertions(+), 24 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index c96b83414a..8499fec400 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -75,14 +75,6 @@ namespace { */ std::string unifyPath(const std::string &path); -/** - * Returns the last path component. - * - * @param path Path string. - * @return Last path component. - */ -std::string getLastPathComponent(const std::string &path); - /** * Display the help text for the program. * @@ -606,14 +598,6 @@ std::string unifyPath(const std::string &path) { return result; } -std::string getLastPathComponent(const std::string &path) { - std::string::size_type pos = path.find_last_of('/'); - if (pos == std::string::npos) - return path; - else - return path.substr(pos + 1); -} - void displayHelp(const char *exe) { using std::cout; @@ -1001,7 +985,7 @@ bool isInList(const std::string &dir, const std::string &fileName, const StringL continue; } - const std::string lastPathComponent = getLastPathComponent(*i); + const std::string lastPathComponent = ProjectProvider::getLastPathComponent(*i); if (extensionName == "o") { return false; } else if (!producesObjectFile(fileName) && extensionName != "h") { @@ -1304,6 +1288,14 @@ std::string ProjectProvider::createUUID() const { #endif } +std::string ProjectProvider::getLastPathComponent(const std::string &path) { + std::string::size_type pos = path.find_last_of('/'); + if (pos == std::string::npos) + return path; + else + return path.substr(pos + 1); +} + void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &projectFile, const StringList &includeList, const StringList &excludeList, const std::string &filePrefix) { diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 8719143f4a..b4eda8f8d2 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -317,6 +317,14 @@ public: */ void createProject(const BuildSetup &setup); + /** + * Returns the last path component. + * + * @param path Path string. + * @return Last path component. + */ + static std::string getLastPathComponent(const std::string &path); + protected: const int _version; ///< Target project version StringList &_globalWarnings; ///< Global warnings diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 9784bb0bf5..0574814e02 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -202,18 +202,38 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p // Init root group _groups.comment = "PBXGroup"; - Object *group = new Object(this, "PBXGroup", "PBXGroup", "PBXGroup", "", ""); - //Property children; - //children.flags = SettingsAsList; - //group->properties["children"] = children; - group->addProperty("children", "", "", SettingsNoValue|SettingsAsList); + // Create group + std::string name = getLastPathComponent(dir.name); + Object *group = new Object(this, "PBXGroup_" + name , "PBXGroup", "PBXGroup", "", name); + + // List of children + Property children; + children.hasOrder = true; + children.flags = SettingsAsList; + group->addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable); group->addProperty("sourceTree", "", "", SettingsNoValue|SettingsQuoteVariable); - _groups.add(group); + int order = 0; + for (FileNode::NodeList::const_iterator i = dir.children.begin(); i != dir.children.end(); ++i) { + const FileNode *node = *i; + + std::string id = "FileReference_" + node->name; + FileProperty property = FileProperty(node->name, node->name, node->name, ""); + + ADD_SETTING_ORDER_NOVALUE(children, getHash(id), node->name, order++); + ADD_BUILD_FILE(id, node->name, node->name + " in Sources"); + ADD_FILE_REFERENCE(node->name, property); + + // Process child nodes + if (!node->children.empty()) + writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/'); + } - // TODO Add files + group->properties["children"] = children; + + _groups.add(group); } ////////////////////////////////////////////////////////////////////////// @@ -717,6 +737,7 @@ void XCodeProvider::setupBuildConfiguration() { ADD_SETTING_QUOTE(scummvmSimulator_Debug, "FRAMEWORK_SEARCH_PATHS", "$(inherited)"); ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); ADD_SETTING(scummvmSimulator_Debug, "SDKROOT", "iphonesimulator3.2"); + ADD_SETTING_QUOTE(scummvmSimulator_Debug, "VALID_ARCHS", "i386 x86_64"); REMOVE_SETTING(scummvmSimulator_Debug, "TARGETED_DEVICE_FAMILY"); scummvmSimulator_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); @@ -726,6 +747,7 @@ void XCodeProvider::setupBuildConfiguration() { Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property scummvmSimulator_Release(scummvmSimulator_Debug); ADD_SETTING(scummvmSimulator_Release, "COPY_PHASE_STRIP", "YES"); + ADD_SETTING(scummvmSimulator_Release, "GCC_OPTIMIZATION_LEVEL", "3"); REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC"); ADD_SETTING(scummvmSimulator_Release, "WRAPPER_EXTENSION", "app"); -- cgit v1.2.3 From 73598c64dc317362c5fd534485b6a083aa1531f1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:25:37 +0200 Subject: CREATE_PROJECT: Fix "if" formatting. --- devtools/create_project/xcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 0574814e02..62dd417d8c 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -917,7 +917,7 @@ std::string XCodeProvider::writeSetting(const std::string &variable, const Setti for (unsigned int i = 0, count = 0; i < setting.entries.size(); ++i) { std::string value = setting.entries.at(i).value; - if(!value.empty()) { + if (!value.empty()) { if (count++ > 0) output += "," + newline; -- cgit v1.2.3 From 9821f3022433a0cc6f55733e6609fb2b11afc005 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 5 Sep 2012 07:54:33 -0400 Subject: CREATE_PROJECT: Add config option to disable language extensions and edit and continue (per-project) --- devtools/create_project/config.h | 7 +++++-- devtools/create_project/create_project.cpp | 28 ++-------------------------- devtools/create_project/create_project.h | 24 ++++++++++++++++++++++++ devtools/create_project/msbuild.cpp | 21 ++++++++++++--------- devtools/create_project/msvc.cpp | 17 ++++++++++------- devtools/create_project/msvc.h | 2 ++ devtools/create_project/visualstudio.cpp | 8 +++++--- 7 files changed, 60 insertions(+), 47 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h index 20c1391cef..de4703a47d 100644 --- a/devtools/create_project/config.h +++ b/devtools/create_project/config.h @@ -28,7 +28,10 @@ #define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable #define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION" -//#define ADDITIONAL_LIBRARY "" -#define NEEDS_RTTI 0 +#define ENABLE_LANGUAGE_EXTENSIONS "" // Comma separated list of projects that need language extensions +#define DISABLE_EDIT_AND_CONTINUE "tinsel,tony" // Comma separated list of projects that need Edit&Continue to be disabled for co-routine support (the main project is automatically added) + +//#define ADDITIONAL_LIBRARY "" // Add a single library to the list of externally linked libraries +#define NEEDS_RTTI 0 // Enable RTTI globally #endif // TOOLS_CREATE_PROJECT_CONFIG_H diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 8499fec400..a8e09ff5eb 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -97,30 +97,6 @@ struct FSNode { }; typedef std::list FileList; - -typedef StringList TokenList; - -/** - * Takes a given input line and creates a list of tokens out of it. - * - * A token in this context is separated by whitespaces. A special case - * are quotation marks though. A string inside quotation marks is treated - * as single token, even when it contains whitespaces. - * - * Thus for example the input: - * foo bar "1 2 3 4" ScummVM - * will create a list with the following entries: - * "foo", "bar", "1 2 3 4", "ScummVM" - * As you can see the quotation marks will get *removed* too. - * - * You can also use this with non-whitespace by passing another separator - * character (e.g. ','). - * - * @param input The text to be tokenized. - * @param separator The token separator. - * @return A list of tokens. - */ -TokenList tokenize(const std::string &input, char separator = ' '); } // End of anonymous namespace enum ProjectType { @@ -526,7 +502,7 @@ int main(int argc, char *argv[]) { projectWarnings["agos"].push_back("4511"); projectWarnings["dreamweb"].push_back("4355"); - + projectWarnings["lure"].push_back("4189"); projectWarnings["lure"].push_back("4355"); @@ -787,6 +763,7 @@ bool parseEngine(const std::string &line, EngineDesc &engine) { return true; } +} // End of anonymous namespace TokenList tokenize(const std::string &input, char separator) { TokenList result; @@ -819,7 +796,6 @@ TokenList tokenize(const std::string &input, char separator) { return result; } -} // End of anonymous namespace namespace { const Feature s_features[] = { diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index b4eda8f8d2..de77793ee7 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -31,6 +31,30 @@ typedef std::list StringList; +typedef StringList TokenList; + +/** + * Takes a given input line and creates a list of tokens out of it. + * + * A token in this context is separated by whitespaces. A special case + * are quotation marks though. A string inside quotation marks is treated + * as single token, even when it contains whitespaces. + * + * Thus for example the input: + * foo bar "1 2 3 4" ScummVM + * will create a list with the following entries: + * "foo", "bar", "1 2 3 4", "ScummVM" + * As you can see the quotation marks will get *removed* too. + * + * You can also use this with non-whitespace by passing another separator + * character (e.g. ','). + * + * @param input The text to be tokenized. + * @param separator The token separator. + * @return A list of tokens. + */ +TokenList tokenize(const std::string &input, char separator = ' '); + /** * Structure to describe a game engine to be built into ScummVM. * diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index c797770955..0f77d91852 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -241,9 +241,11 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s // Check for project-specific warnings: std::map::iterator warningsIterator = _projectWarnings.find(name); + bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end(); + bool disableEditAndContinue = find(_disableEditAndContinue.begin(), _disableEditAndContinue.end(), name) != _disableEditAndContinue.end(); // Nothing to add here, move along! - if (!setup.devTools && name != setup.projectName && name != "sword25" && name != "scummvm" && name != "grim" && warningsIterator == _projectWarnings.end()) + if (!setup.devTools && name != setup.projectName && !enableLanguageExtensions && !disableEditAndContinue && warningsIterator == _projectWarnings.end()) return; std::string warnings = ""; @@ -254,16 +256,17 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s project << "\t\n" "\t\t\n"; - // Compile configuration - if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { + // Language Extensions + if (setup.devTools || name == setup.projectName || enableLanguageExtensions) project << "\t\t\tfalse\n"; - if (name == setup.projectName && !isRelease) - project << "\t\t\tProgramDatabase\n"; - } else { - if (warningsIterator != _projectWarnings.end()) - project << "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n"; - } + // Edit and Continue + if ((name == setup.projectName || disableEditAndContinue) && !isRelease) + project << "\t\t\tProgramDatabase\n"; + + // Warnings + if (warningsIterator != _projectWarnings.end()) + project << "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n"; project << "\t\t\n"; diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index 96eaf643d1..f995c108c7 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -33,6 +33,9 @@ namespace CreateProjectTool { ////////////////////////////////////////////////////////////////////////// MSVCProvider::MSVCProvider(StringList &global_warnings, std::map &project_warnings, const int version) : ProjectProvider(global_warnings, project_warnings, version) { + + _enableLanguageExtensions = tokenize(ENABLE_LANGUAGE_EXTENSIONS, ','); + _disableEditAndContinue = tokenize(DISABLE_EDIT_AND_CONTINUE, ','); } void MSVCProvider::createWorkspace(const BuildSetup &setup) { @@ -75,10 +78,10 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) { solution << "Global\n" "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n" "\t\tDebug|Win32 = Debug|Win32\n" - "\t\tAnalysis|Win32 = Analysis|Win32\n" + "\t\tAnalysis|Win32 = Analysis|Win32\n" "\t\tRelease|Win32 = Release|Win32\n" "\t\tDebug|x64 = Debug|x64\n" - "\t\tAnalysis|x64 = Analysis|x64\n" + "\t\tAnalysis|x64 = Analysis|x64\n" "\t\tRelease|x64 = Release|x64\n" "\tEndGlobalSection\n" "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n"; @@ -86,14 +89,14 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) { for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) { solution << "\t\t{" << i->second << "}.Debug|Win32.ActiveCfg = Debug|Win32\n" "\t\t{" << i->second << "}.Debug|Win32.Build.0 = Debug|Win32\n" - "\t\t{" << i->second << "}.Analysis|Win32.ActiveCfg = Analysis|Win32\n" - "\t\t{" << i->second << "}.Analysis|Win32.Build.0 = Analysis|Win32\n" + "\t\t{" << i->second << "}.Analysis|Win32.ActiveCfg = Analysis|Win32\n" + "\t\t{" << i->second << "}.Analysis|Win32.Build.0 = Analysis|Win32\n" "\t\t{" << i->second << "}.Release|Win32.ActiveCfg = Release|Win32\n" "\t\t{" << i->second << "}.Release|Win32.Build.0 = Release|Win32\n" "\t\t{" << i->second << "}.Debug|x64.ActiveCfg = Debug|x64\n" "\t\t{" << i->second << "}.Debug|x64.Build.0 = Debug|x64\n" - "\t\t{" << i->second << "}.Analysis|x64.ActiveCfg = Analysis|x64\n" - "\t\t{" << i->second << "}.Analysis|x64.Build.0 = Analysis|x64\n" + "\t\t{" << i->second << "}.Analysis|x64.ActiveCfg = Analysis|x64\n" + "\t\t{" << i->second << "}.Analysis|x64.Build.0 = Analysis|x64\n" "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n" "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n"; } @@ -139,7 +142,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) { StringList x64EngineDefines = getEngineDefines(setup.engines); x64Defines.splice(x64Defines.end(), x64EngineDefines); - // HACK: This definitly should not be here, but otherwise we would not define SDL_BACKEND for x64. + // HACK: This definitely should not be here, but otherwise we would not define SDL_BACKEND for x64. x64Defines.push_back("WIN32"); x64Defines.push_back("SDL_BACKEND"); diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h index 0a994667fa..5a854b596a 100644 --- a/devtools/create_project/msvc.h +++ b/devtools/create_project/msvc.h @@ -32,6 +32,8 @@ public: MSVCProvider(StringList &global_warnings, std::map &project_warnings, const int version); protected: + StringList _enableLanguageExtensions; + StringList _disableEditAndContinue; void createWorkspace(const BuildSetup &setup); diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index c301e78ad1..de2df96d78 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -103,6 +103,9 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: outputConfiguration(project, setup, libraries, "Release", "x64", "64", false); } else { + bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end(); + bool disableEditAndContinue = find(_disableEditAndContinue.begin(), _disableEditAndContinue.end(), name) != _disableEditAndContinue.end(); + std::string warnings = ""; if (warningsIterator != _projectWarnings.end()) for (StringList::const_iterator i = warningsIterator->second.begin(); i != warningsIterator->second.end(); ++i) @@ -110,9 +113,8 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == setup.projectName ? "DebugInformationFormat=\"3\" " : ""); - toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); - toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); + toolConfig += (disableEditAndContinue ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (enableLanguageExtensions ? "DisableLanguageExtensions=\"false\" " : ""); // Win32 outputConfiguration(setup, project, toolConfig, "Debug", "Win32", ""); -- cgit v1.2.3 From 754a4bb8e422251b82175adef246d92bc33f83df Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 5 Sep 2012 07:56:23 -0400 Subject: CREATE_PROJECT: Remove hardcoded define for post-build event --- devtools/create_project/msvc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index f995c108c7..b8d2401af9 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -171,7 +171,7 @@ std::string MSVCProvider::getPostBuildEvent(bool isWin32, bool createInstaller) cmdLine += (isWin32) ? "x86" : "x64"; - cmdLine += " %SCUMMVM_LIBS% "; + cmdLine += " %" LIBS_DEFINE "% "; // Specify if installer needs to be built or not cmdLine += (createInstaller ? "1" : "0"); -- cgit v1.2.3 From b6534b2784a713237758bcb7c0a1ea9c7861cc82 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 5 Sep 2012 20:27:46 -0400 Subject: CREATE_PROJECT: Copy translations.dat in postbuild step --- devtools/create_project/scripts/postbuild.cmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index d78119d058..8b70ec3dd8 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -24,8 +24,10 @@ echo Copying data files echo. xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1 -xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1 xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~1/gui/themes/translations.dat" "%~2" 1>NUL 2>&1 + if "%~5"=="0" goto done -- cgit v1.2.3 From 89abab97e3124fa25eb4c7d3e8b38501747a8d17 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 26 Sep 2012 04:17:31 +0200 Subject: JANITORIAL: Remove trailing whitespaces. Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//' --- devtools/create_project/xcode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 62dd417d8c..a9b8e7a752 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -206,7 +206,7 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p // Create group std::string name = getLastPathComponent(dir.name); Object *group = new Object(this, "PBXGroup_" + name , "PBXGroup", "PBXGroup", "", name); - + // List of children Property children; children.hasOrder = true; @@ -225,7 +225,7 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p ADD_SETTING_ORDER_NOVALUE(children, getHash(id), node->name, order++); ADD_BUILD_FILE(id, node->name, node->name + " in Sources"); ADD_FILE_REFERENCE(node->name, property); - + // Process child nodes if (!node->children.empty()) writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/'); -- cgit v1.2.3