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') 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