aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-12 06:31:46 +0100
committerJohannes Schickel2015-12-12 06:54:57 +0100
commit70a4047a78181a055787baf5b4f6a54e7aa67201 (patch)
tree524163469f628335a50b8873412ecc75fa1fe5a7 /devtools
parentd09c3e28a641dee96df51a6297e11932cc118253 (diff)
downloadscummvm-rg350-70a4047a78181a055787baf5b4f6a54e7aa67201.tar.gz
scummvm-rg350-70a4047a78181a055787baf5b4f6a54e7aa67201.tar.bz2
scummvm-rg350-70a4047a78181a055787baf5b4f6a54e7aa67201.zip
DEVTOOLS: Adjust enum constant names to match our conventions.
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_project/xcode.cpp236
-rw-r--r--devtools/create_project/xcode.h16
2 files changed, 126 insertions, 126 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 534b67f409..ed3ba0f8cc 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -42,19 +42,19 @@ namespace CreateProjectTool {
defines.push_back(name);
#define ADD_SETTING(config, key, value) \
- config._settings[key] = Setting(value, "", SettingsNoQuote);
+ config._settings[key] = Setting(value, "", kSettingsNoQuote);
#define ADD_SETTING_ORDER(config, key, value, order) \
- config._settings[key] = Setting(value, "", SettingsNoQuote, 0, order);
+ config._settings[key] = Setting(value, "", kSettingsNoQuote, 0, order);
#define ADD_SETTING_ORDER_NOVALUE(config, key, comment, order) \
- config._settings[key] = Setting("", comment, SettingsNoValue, 0, order);
+ config._settings[key] = Setting("", comment, kSettingsNoValue, 0, order);
#define ADD_SETTING_QUOTE(config, key, value) \
config._settings[key] = Setting(value);
#define ADD_SETTING_QUOTE_VAR(config, key, value) \
- config._settings[key] = Setting(value, "", SettingsQuoteVariable);
+ config._settings[key] = Setting(value, "", kSettingsQuoteVariable);
#define ADD_SETTING_LIST(config, key, values, flags, indent) \
config._settings[key] = Setting(values, flags, indent);
@@ -64,20 +64,20 @@ namespace CreateProjectTool {
#define ADD_BUILD_FILE(id, name, fileRefId, comment) { \
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment); \
- buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue); \
+ buildFile->addProperty("fileRef", fileRefId, name, kSettingsNoValue); \
_buildFile.add(buildFile); \
- _buildFile._flags = SettingsSingleItem; \
+ _buildFile._flags = kSettingsSingleItem; \
}
#define ADD_FILE_REFERENCE(id, name, properties) { \
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name); \
- if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", SettingsNoValue); \
- if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", SettingsNoValue); \
+ if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", kSettingsNoValue); \
+ if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", kSettingsNoValue|kSettingsQuoteVariable); \
+ if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", kSettingsNoValue|kSettingsQuoteVariable); \
+ if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", kSettingsNoValue|kSettingsQuoteVariable); \
+ if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", kSettingsNoValue); \
_fileReference.add(fileRef); \
- _fileReference._flags = SettingsSingleItem; \
+ _fileReference._flags = kSettingsSingleItem; \
}
bool producesObjectFileOnOSX(const std::string &fileName) {
@@ -93,11 +93,11 @@ bool producesObjectFileOnOSX(const std::string &fileName) {
}
XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &groupName, const std::string &uniqueName, const std::string &path) : Object(objectParent, uniqueName, groupName, "PBXGroup", "", groupName) {
- addProperty("name", _name, "", SettingsNoValue | SettingsQuoteVariable);
- addProperty("sourceTree", "<group>", "", SettingsNoValue | SettingsQuoteVariable);
+ addProperty("name", _name, "", kSettingsNoValue | kSettingsQuoteVariable);
+ addProperty("sourceTree", "<group>", "", kSettingsNoValue | kSettingsQuoteVariable);
if (path != "") {
- addProperty("path", path, "", SettingsNoValue | SettingsQuoteVariable);
+ addProperty("path", path, "", kSettingsNoValue | kSettingsQuoteVariable);
}
_childOrder = 0;
_treeName = uniqueName;
@@ -117,16 +117,16 @@ void XcodeProvider::Group::addChildInternal(const std::string &id, const std::st
if (_properties.find("children") == _properties.end()) {
Property children;
children._hasOrder = true;
- children._flags = SettingsAsList;
+ children._flags = kSettingsAsList;
_properties["children"] = children;
}
- _properties["children"]._settings[id] = Setting("", comment + " in Sources", SettingsNoValue, 0, _childOrder++);
+ _properties["children"]._settings[id] = Setting("", comment + " in Sources", kSettingsNoValue, 0, _childOrder++);
if (_childOrder == 1) {
// Force children to use () even when there is only 1 child.
// Also this enforces the use of "," after the single item, instead of ; (see writeProperty)
- _properties["children"]._flags |= SettingsSingleItem;
+ _properties["children"]._flags |= kSettingsSingleItem;
} else {
- _properties["children"]._flags ^= SettingsSingleItem;
+ _properties["children"]._flags ^= kSettingsSingleItem;
}
}
@@ -180,31 +180,31 @@ XcodeProvider::Group *XcodeProvider::touchGroupsForPath(const std::string &path)
void XcodeProvider::addFileReference(const std::string &id, const std::string &name, FileProperty properties) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
- if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", SettingsNoValue);
- if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", SettingsNoValue | SettingsQuoteVariable);
- if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", SettingsNoValue | SettingsQuoteVariable);
- if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", SettingsNoValue | SettingsQuoteVariable);
- if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", SettingsNoValue);
+ if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", kSettingsNoValue);
+ if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", kSettingsNoValue | kSettingsQuoteVariable);
+ if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", kSettingsNoValue | kSettingsQuoteVariable);
+ if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", kSettingsNoValue | kSettingsQuoteVariable);
+ if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", kSettingsNoValue);
_fileReference.add(fileRef);
- _fileReference._flags = SettingsSingleItem;
+ _fileReference._flags = kSettingsSingleItem;
}
void XcodeProvider::addProductFileReference(const std::string &id, const std::string &name) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
- fileRef->addProperty("explicitFileType", "compiled.mach-o.executable", "", SettingsNoValue | SettingsQuoteVariable);
- fileRef->addProperty("includeInIndex", "0", "", SettingsNoValue);
- fileRef->addProperty("path", name, "", SettingsNoValue | SettingsQuoteVariable);
- fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", SettingsNoValue);
+ fileRef->addProperty("explicitFileType", "compiled.mach-o.executable", "", kSettingsNoValue | kSettingsQuoteVariable);
+ fileRef->addProperty("includeInIndex", "0", "", kSettingsNoValue);
+ fileRef->addProperty("path", name, "", kSettingsNoValue | kSettingsQuoteVariable);
+ fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", kSettingsNoValue);
_fileReference.add(fileRef);
- _fileReference._flags = SettingsSingleItem;
+ _fileReference._flags = kSettingsSingleItem;
}
void XcodeProvider::addBuildFile(const std::string &id, const std::string &name, const std::string &fileRefId, const std::string &comment) {
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment);
- buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue);
+ buildFile->addProperty("fileRef", fileRefId, name, kSettingsNoValue);
_buildFile.add(buildFile);
- _buildFile._flags = SettingsSingleItem;
+ _buildFile._flags = kSettingsSingleItem;
}
XcodeProvider::XcodeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
@@ -274,10 +274,10 @@ void XcodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
// Header
project << "// !$*UTF8*$!\n"
"{\n"
- "\t" << writeSetting("archiveVersion", "1", "", SettingsNoQuote) << ";\n"
+ "\t" << writeSetting("archiveVersion", "1", "", kSettingsNoQuote) << ";\n"
"\tclasses = {\n"
"\t};\n"
- "\t" << writeSetting("objectVersion", "46", "", SettingsNoQuote) << ";\n"
+ "\t" << writeSetting("objectVersion", "46", "", kSettingsNoQuote) << ";\n"
"\tobjects = {\n";
//////////////////////////////////////////////////////////////////////////
@@ -297,7 +297,7 @@ void XcodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
//////////////////////////////////////////////////////////////////////////
// Footer
project << "\t};\n"
- "\t" << writeSetting("rootObject", getHash("PBXProject"), "Project object", SettingsNoQuote) << ";\n"
+ "\t" << writeSetting("rootObject", getHash("PBXProject"), "Project object", kSettingsNoQuote) << ";\n"
"}\n";
}
@@ -350,7 +350,7 @@ void XcodeProvider::setupFrameworksBuildPhase() {
Property children;
children._hasOrder = true;
- children._flags = SettingsAsList;
+ children._flags = kSettingsAsList;
// Setup framework file properties
std::map<std::string, FileProperty> properties;
@@ -393,13 +393,13 @@ void XcodeProvider::setupFrameworksBuildPhase() {
// iPhone
Object *framework_iPhone = new Object(this, "PBXFrameworksBuildPhase_" + _targets[IOS_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
- framework_iPhone->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
- framework_iPhone->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ framework_iPhone->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
+ framework_iPhone->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property iPhone_files;
iPhone_files._hasOrder = true;
- iPhone_files._flags = SettingsAsList;
+ iPhone_files._flags = kSettingsAsList;
ValueList frameworks_iPhone;
frameworks_iPhone.push_back("CoreAudio.framework");
@@ -431,13 +431,13 @@ void XcodeProvider::setupFrameworksBuildPhase() {
// ScummVM-OS X
Object *framework_OSX = new Object(this, "PBXFrameworksBuildPhase_" + _targets[OSX_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
- framework_OSX->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
- framework_OSX->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ framework_OSX->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
+ framework_OSX->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property osx_files;
osx_files._hasOrder = true;
- osx_files._flags = SettingsAsList;
+ osx_files._flags = kSettingsAsList;
ValueList frameworks_osx;
frameworks_osx.push_back("CoreFoundation.framework");
@@ -473,13 +473,13 @@ void XcodeProvider::setupFrameworksBuildPhase() {
// Simulator
Object *framework_simulator = new Object(this, "PBXFrameworksBuildPhase_" + _targets[SIM_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
- framework_simulator->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
- framework_simulator->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ framework_simulator->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
+ framework_simulator->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property simulator_files;
simulator_files._hasOrder = true;
- simulator_files._flags = SettingsAsList;
+ simulator_files._flags = kSettingsAsList;
ValueList frameworks_simulator;
frameworks_simulator.push_back("CoreAudio.framework");
@@ -520,26 +520,26 @@ void XcodeProvider::setupNativeTarget() {
#endif
Object *target = new Object(this, "PBXNativeTarget_" + _targets[i], "PBXNativeTarget", "PBXNativeTarget", "", _targets[i]);
- target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", SettingsNoValue);
+ target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", kSettingsNoValue);
Property buildPhases;
buildPhases._hasOrder = true;
- buildPhases._flags = SettingsAsList;
- buildPhases._settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", SettingsNoValue, 0, 0);
- buildPhases._settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", SettingsNoValue, 0, 1);
- buildPhases._settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", SettingsNoValue, 0, 2);
+ buildPhases._flags = kSettingsAsList;
+ buildPhases._settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", kSettingsNoValue, 0, 0);
+ buildPhases._settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", kSettingsNoValue, 0, 1);
+ buildPhases._settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", kSettingsNoValue, 0, 2);
target->_properties["buildPhases"] = buildPhases;
- target->addProperty("buildRules", "", "", SettingsNoValue | SettingsAsList);
+ target->addProperty("buildRules", "", "", kSettingsNoValue | kSettingsAsList);
- target->addProperty("dependencies", "", "", SettingsNoValue | SettingsAsList);
+ target->addProperty("dependencies", "", "", kSettingsNoValue | kSettingsAsList);
- target->addProperty("name", _targets[i], "", SettingsNoValue | SettingsQuoteVariable);
- target->addProperty("productName", PROJECT_NAME, "", SettingsNoValue);
+ target->addProperty("name", _targets[i], "", kSettingsNoValue | kSettingsQuoteVariable);
+ target->addProperty("productName", PROJECT_NAME, "", kSettingsNoValue);
addProductFileReference("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i], PROJECT_DESCRIPTION ".app");
productsGroup->addChildByHash(getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app");
- target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", SettingsNoValue);
- target->addProperty("productType", "com.apple.product-type.application", "", SettingsNoValue | SettingsQuoteVariable);
+ target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", kSettingsNoValue);
+ target->addProperty("productType", "com.apple.product-type.application", "", kSettingsNoValue | kSettingsQuoteVariable);
_nativeTarget.add(target);
}
@@ -552,38 +552,38 @@ void XcodeProvider::setupProject() {
Object *project = new Object(this, "PBXProject", "PBXProject", "PBXProject", "", "Project object");
- 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);
+ project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", kSettingsNoValue);
+ project->addProperty("compatibilityVersion", "Xcode 3.2", "", kSettingsNoValue | kSettingsQuoteVariable);
+ project->addProperty("developmentRegion", "English", "", kSettingsNoValue);
+ project->addProperty("hasScannedForEncodings", "1", "", kSettingsNoValue);
// List of known regions
Property regions;
- regions._flags = SettingsAsList;
+ regions._flags = kSettingsAsList;
ADD_SETTING_ORDER_NOVALUE(regions, "English", "", 0);
ADD_SETTING_ORDER_NOVALUE(regions, "Japanese", "", 1);
ADD_SETTING_ORDER_NOVALUE(regions, "French", "", 2);
ADD_SETTING_ORDER_NOVALUE(regions, "German", "", 3);
project->_properties["knownRegions"] = regions;
- project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", SettingsNoValue);
- project->addProperty("projectDirPath", _projectRoot, "", SettingsNoValue | SettingsQuoteVariable);
- project->addProperty("projectRoot", "", "", SettingsNoValue | SettingsQuoteVariable);
+ project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", kSettingsNoValue);
+ project->addProperty("projectDirPath", _projectRoot, "", kSettingsNoValue | kSettingsQuoteVariable);
+ project->addProperty("projectRoot", "", "", kSettingsNoValue | kSettingsQuoteVariable);
// List of targets
Property targets;
- targets._flags = SettingsAsList;
+ targets._flags = kSettingsAsList;
#ifdef ENABLE_IOS
- targets._settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], kSettingsNoValue, 0, 0);
#endif
- targets._settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], kSettingsNoValue, 0, 1);
#ifdef ENABLE_IOS
- targets._settings[getHash("PBXNativeTarget_" + _targets[SIM_TARGET])] = Setting("", _targets[SIM_TARGET], SettingsNoValue, 0, 2);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[SIM_TARGET])] = Setting("", _targets[SIM_TARGET], kSettingsNoValue, 0, 2);
#endif
project->_properties["targets"] = targets;
#ifndef ENABLE_IOS
// Force list even when there is only a single target
- project->_properties["targets"]._flags |= SettingsSingleItem;
+ project->_properties["targets"]._flags |= kSettingsSingleItem;
#endif
_project.add(project);
@@ -615,12 +615,12 @@ void XcodeProvider::setupResourcesBuildPhase() {
for (unsigned int i = 0; i < _targets.size(); i++) {
Object *resource = new Object(this, "PBXResourcesBuildPhase_" + _targets[i], "PBXResourcesBuildPhase", "PBXResourcesBuildPhase", "", "Resources");
- resource->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
+ resource->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
// Add default files
Property files;
files._hasOrder = true;
- files._flags = SettingsAsList;
+ files._flags = kSettingsAsList;
ValueList files_list;
files_list.push_back("scummclassic.zip");
@@ -651,7 +651,7 @@ void XcodeProvider::setupResourcesBuildPhase() {
// Add custom files depending on the target
if (_targets[i] == PROJECT_DESCRIPTION "-OS X") {
- files._settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", SettingsNoValue, 0, 6);
+ files._settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", kSettingsNoValue, 0, 6);
// Remove 2 iphone icon files
files._settings.erase(getHash("PBXResources_Default.png"));
@@ -660,7 +660,7 @@ void XcodeProvider::setupResourcesBuildPhase() {
resource->_properties["files"] = files;
- resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
_resourcesBuildPhase.add(resource);
}
@@ -676,11 +676,11 @@ void XcodeProvider::setupSourcesBuildPhase() {
for (unsigned int i = 0; i < _targets.size(); i++) {
Object *source = new Object(this, "PBXSourcesBuildPhase_" + _targets[i], "PBXSourcesBuildPhase", "PBXSourcesBuildPhase", "", "Sources");
- source->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
+ source->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
Property files;
files._hasOrder = true;
- files._flags = SettingsAsList;
+ files._flags = kSettingsAsList;
int order = 0;
for (std::vector<Object *>::iterator file = _buildFile._objects.begin(); file != _buildFile._objects.end(); ++file) {
@@ -693,7 +693,7 @@ void XcodeProvider::setupSourcesBuildPhase() {
source->_properties["files"] = files;
- source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
_sourcesBuildPhase.add(source);
}
@@ -703,7 +703,7 @@ void XcodeProvider::setupSourcesBuildPhase() {
void XcodeProvider::setupBuildConfiguration() {
_buildConfiguration._comment = "XCBuildConfiguration";
- _buildConfiguration._flags = SettingsAsList;
+ _buildConfiguration._flags = kSettingsAsList;
///****************************************
// * iPhone
@@ -721,7 +721,7 @@ void XcodeProvider::setupBuildConfiguration() {
ValueList iPhone_FrameworkSearchPaths;
iPhone_FrameworkSearchPaths.push_back("$(inherited)");
iPhone_FrameworkSearchPaths.push_back("\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"");
- ADD_SETTING_LIST(iPhone_Debug, "FRAMEWORK_SEARCH_PATHS", iPhone_FrameworkSearchPaths, SettingsAsList, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "FRAMEWORK_SEARCH_PATHS", iPhone_FrameworkSearchPaths, kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "GCC_DYNAMIC_NO_PIC", "NO");
ADD_SETTING(iPhone_Debug, "GCC_ENABLE_CPP_EXCEPTIONS", "NO");
ADD_SETTING(iPhone_Debug, "GCC_ENABLE_FIX_AND_CONTINUE", "NO");
@@ -734,12 +734,12 @@ void XcodeProvider::setupBuildConfiguration() {
iPhone_HeaderSearchPaths.push_back("$(SRCROOT)/engines/");
iPhone_HeaderSearchPaths.push_back("$(SRCROOT)");
iPhone_HeaderSearchPaths.push_back("include/");
- ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, SettingsAsList | SettingsQuoteVariable, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, kSettingsAsList | kSettingsQuoteVariable, 5);
ADD_SETTING(iPhone_Debug, "INFOPLIST_FILE", "Info.plist");
ValueList iPhone_LibPaths;
iPhone_LibPaths.push_back("$(inherited)");
iPhone_LibPaths.push_back("\"$(SRCROOT)/lib\"");
- ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, SettingsAsList, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES");
ADD_SETTING(iPhone_Debug, "PREBINDING", "NO");
ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION);
@@ -748,7 +748,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(iPhone_Debug, "SDKROOT", "iphoneos4.0");
ADD_SETTING_QUOTE(iPhone_Debug, "TARGETED_DEVICE_FAMILY", "1,2");
- iPhone_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
+ iPhone_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
iPhone_Debug_Object->_properties["buildSettings"] = iPhone_Debug;
// Release
@@ -759,7 +759,7 @@ void XcodeProvider::setupBuildConfiguration() {
REMOVE_SETTING(iPhone_Release, "GCC_DYNAMIC_NO_PIC");
ADD_SETTING(iPhone_Release, "WRAPPER_EXTENSION", "app");
- iPhone_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
+ iPhone_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
iPhone_Release_Object->_properties["buildSettings"] = iPhone_Release;
_buildConfiguration.add(iPhone_Debug_Object);
@@ -787,7 +787,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_DEFINE(scummvm_defines, "IPHONE");
ADD_DEFINE(scummvm_defines, "XCODE");
ADD_DEFINE(scummvm_defines, "IPHONE_OFFICIAL");
- ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote | SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING(scummvm_Debug, "GCC_THUMB_SUPPORT", "NO");
ADD_SETTING(scummvm_Debug, "GCC_USE_GCC3_PFE_SUPPORT", "NO");
ADD_SETTING(scummvm_Debug, "GCC_WARN_ABOUT_RETURN_TYPE", "YES");
@@ -796,7 +796,7 @@ void XcodeProvider::setupBuildConfiguration() {
scummvm_HeaderPaths.push_back("include/");
scummvm_HeaderPaths.push_back("$(SRCROOT)/engines/");
scummvm_HeaderPaths.push_back("$(SRCROOT)");
- ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, SettingsQuoteVariable | SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, kSettingsQuoteVariable | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvm_Debug, "LIBRARY_SEARCH_PATHS", "");
ADD_SETTING(scummvm_Debug, "ONLY_ACTIVE_ARCH", "YES");
ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_CFLAGS", "");
@@ -804,7 +804,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(scummvm_Debug, "PREBINDING", "NO");
ADD_SETTING(scummvm_Debug, "SDKROOT", "macosx");
- scummvm_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
+ scummvm_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
scummvm_Debug_Object->_properties["buildSettings"] = scummvm_Debug;
// Release
@@ -815,7 +815,7 @@ void XcodeProvider::setupBuildConfiguration() {
REMOVE_SETTING(scummvm_Release, "GCC_WARN_UNUSED_VARIABLE");
REMOVE_SETTING(scummvm_Release, "ONLY_ACTIVE_ARCH");
- scummvm_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
+ scummvm_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
scummvm_Release_Object->_properties["buildSettings"] = scummvm_Release;
_buildConfiguration.add(scummvm_Debug_Object);
@@ -844,7 +844,7 @@ void XcodeProvider::setupBuildConfiguration() {
ValueList scummvmOSX_defines(_defines);
ADD_DEFINE(scummvmOSX_defines, "SDL_BACKEND");
ADD_DEFINE(scummvmOSX_defines, "MACOSX");
- ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, SettingsNoQuote | SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "GCC_VERSION", "");
ValueList scummvmOSX_HeaderPaths;
scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL");
@@ -853,14 +853,14 @@ void XcodeProvider::setupBuildConfiguration() {
scummvmOSX_HeaderPaths.push_back("include/");
scummvmOSX_HeaderPaths.push_back("$(SRCROOT)/engines/");
scummvmOSX_HeaderPaths.push_back("$(SRCROOT)");
- ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, SettingsQuoteVariable | SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, kSettingsQuoteVariable | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/macosx/Info.plist");
ValueList scummvmOSX_LibPaths;
scummvmOSX_LibPaths.push_back("/sw/lib");
scummvmOSX_LibPaths.push_back("/opt/local/lib");
scummvmOSX_LibPaths.push_back("\"$(inherited)\"");
scummvmOSX_LibPaths.push_back("\"\\\\\\\"$(SRCROOT)/lib\\\\\\\"\""); // mmmh, all those slashes, it's almost Christmas \o/
- ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, SettingsNoQuote | SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "OTHER_CFLAGS", "");
ValueList scummvmOSX_LdFlags;
scummvmOSX_LdFlags.push_back("-lSDLmain");
@@ -875,11 +875,11 @@ void XcodeProvider::setupBuildConfiguration() {
scummvmOSX_LdFlags.push_back("-lFLAC");
scummvmOSX_LdFlags.push_back("-lSDL");
scummvmOSX_LdFlags.push_back("-lz");
- ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, kSettingsAsList, 5);
ADD_SETTING(scummvmOSX_Debug, "PREBINDING", "NO");
ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION);
- scummvmOSX_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
+ scummvmOSX_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
scummvmOSX_Debug_Object->_properties["buildSettings"] = scummvmOSX_Debug;
// Release
@@ -890,7 +890,7 @@ void XcodeProvider::setupBuildConfiguration() {
REMOVE_SETTING(scummvmOSX_Release, "GCC_OPTIMIZATION_LEVEL");
ADD_SETTING(scummvmOSX_Release, "WRAPPER_EXTENSION", "app");
- scummvmOSX_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
+ scummvmOSX_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
scummvmOSX_Release_Object->_properties["buildSettings"] = scummvmOSX_Release;
_buildConfiguration.add(scummvmOSX_Debug_Object);
@@ -904,12 +904,12 @@ void XcodeProvider::setupBuildConfiguration() {
Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Debug", _targets[SIM_TARGET] /* 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);
+ ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, kSettingsNoQuote | kSettingsAsList, 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);
+ scummvmSimulator_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
scummvmSimulator_Debug_Object->_properties["buildSettings"] = scummvmSimulator_Debug;
// Release
@@ -920,7 +920,7 @@ void XcodeProvider::setupBuildConfiguration() {
REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC");
ADD_SETTING(scummvmSimulator_Release, "WRAPPER_EXTENSION", "app");
- scummvmSimulator_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
+ scummvmSimulator_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
scummvmSimulator_Release_Object->_properties["buildSettings"] = scummvmSimulator_Release;
_buildConfiguration.add(scummvmSimulator_Debug_Object);
@@ -929,7 +929,7 @@ void XcodeProvider::setupBuildConfiguration() {
//////////////////////////////////////////////////////////////////////////
// Configuration List
_configurationList._comment = "XCConfigurationList";
- _configurationList._flags = SettingsAsList;
+ _configurationList._flags = kSettingsAsList;
#endif
// Warning: This assumes we have all configurations with a Debug & Release pair
for (std::vector<Object *>::iterator config = _buildConfiguration._objects.begin(); config != _buildConfiguration._objects.end(); config++) {
@@ -937,15 +937,15 @@ void XcodeProvider::setupBuildConfiguration() {
Object *configList = new Object(this, "XCConfigurationList_" + (*config)->_name, (*config)->_name, "XCConfigurationList", "", "Build configuration list for " + (*config)->_refType + " \"" + (*config)->_name + "\"");
Property buildConfigs;
- buildConfigs._flags = SettingsAsList;
+ buildConfigs._flags = kSettingsAsList;
- buildConfigs._settings[getHash((*config)->_id)] = Setting("", "Debug", SettingsNoValue, 0, 0);
- buildConfigs._settings[getHash((*(++config))->_id)] = Setting("", "Release", SettingsNoValue, 0, 1);
+ buildConfigs._settings[getHash((*config)->_id)] = Setting("", "Debug", kSettingsNoValue, 0, 0);
+ buildConfigs._settings[getHash((*(++config))->_id)] = Setting("", "Release", kSettingsNoValue, 0, 1);
configList->_properties["buildConfigurations"] = buildConfigs;
- configList->addProperty("defaultConfigurationIsVisible", "0", "", SettingsNoValue);
- configList->addProperty("defaultConfigurationName", "Release", "", SettingsNoValue);
+ configList->addProperty("defaultConfigurationIsVisible", "0", "", kSettingsNoValue);
+ configList->addProperty("defaultConfigurationName", "Release", "", kSettingsNoValue);
_configurationList.add(configList);
}
@@ -1032,30 +1032,30 @@ std::string replace(std::string input, const std::string find, std::string repla
std::string XcodeProvider::writeProperty(const std::string &variable, Property &prop, int flags) const {
std::string output;
- output += (flags & SettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
+ output += (flags & kSettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
- if (prop._settings.size() > 1 || (prop._flags & SettingsSingleItem))
- output += (prop._flags & SettingsAsList) ? "(\n" : "{\n";
+ if (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))
+ output += (prop._flags & kSettingsAsList) ? "(\n" : "{\n";
OrderedSettingList settings = prop.getOrderedSettingList();
for (OrderedSettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting) {
- if (settings.size() > 1 || (prop._flags & SettingsSingleItem))
- output += (flags & SettingsSingleItem ? " " : "\t\t\t\t");
+ if (settings.size() > 1 || (prop._flags & kSettingsSingleItem))
+ output += (flags & kSettingsSingleItem ? " " : "\t\t\t\t");
output += writeSetting(setting->first, setting->second);
- // The combination of SettingsAsList, and SettingsSingleItem should use "," and not ";" (i.e children
+ // The combination of kSettingsAsList, and kSettingsSingleItem should use "," and not ";" (i.e children
// in PBXGroup, so we special case that case here.
- if ((prop._flags & SettingsAsList) && (prop._settings.size() > 1 || (prop._flags & SettingsSingleItem))) {
+ if ((prop._flags & kSettingsAsList) && (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))) {
output += (prop._settings.size() > 0) ? ",\n" : "\n";
} else {
output += ";";
- output += (flags & SettingsSingleItem ? " " : "\n");
+ output += (flags & kSettingsSingleItem ? " " : "\n");
}
}
- if (prop._settings.size() > 1 || (prop._flags & SettingsSingleItem))
- output += (prop._flags & SettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
+ if (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))
+ output += (prop._flags & kSettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
return output;
}
@@ -1068,7 +1068,7 @@ std::string XcodeProvider::writeSetting(const std::string &variable, std::string
// 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) ? "" : "\"";
+ const std::string quote = (setting._flags & kSettingsNoQuote) ? "" : "\"";
const std::string escape_quote = quote.empty() ? "" : "\\" + quote;
std::string newline = "\n";
@@ -1077,12 +1077,12 @@ std::string XcodeProvider::writeSetting(const std::string &variable, const Setti
newline += "\t";
// Setup variable
- std::string var = (setting._flags & SettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
+ std::string var = (setting._flags & kSettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
// Output a list
- if (setting._flags & SettingsAsList) {
+ if (setting._flags & kSettingsAsList) {
- output += var + ((setting._flags & SettingsNoValue) ? "(" : " = (") + newline;
+ output += var + ((setting._flags & kSettingsNoValue) ? "(" : " = (") + newline;
for (unsigned int i = 0, count = 0; i < setting._entries.size(); ++i) {
@@ -1101,11 +1101,11 @@ std::string XcodeProvider::writeSetting(const std::string &variable, const Setti
}
// Add closing ")" on new line
newline.resize(newline.size() - 1);
- output += (setting._flags & SettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
+ output += (setting._flags & kSettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
} else {
output += var;
- output += (setting._flags & SettingsNoValue) ? "" : " = " + quote;
+ output += (setting._flags & kSettingsNoValue) ? "" : " = " + quote;
for (unsigned int i = 0; i < setting._entries.size(); ++i) {
std::string value = setting._entries.at(i)._value;
@@ -1118,7 +1118,7 @@ std::string XcodeProvider::writeSetting(const std::string &variable, const Setti
output += " /* " + comment + " */";
}
- output += (setting._flags & SettingsNoValue) ? "" : quote;
+ output += (setting._flags & kSettingsNoValue) ? "" : quote;
}
return output;
}
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index cadd1898a7..d48f11cb19 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -47,11 +47,11 @@ protected:
const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
private:
enum {
- SettingsAsList = 0x01,
- SettingsSingleItem = 0x02,
- SettingsNoQuote = 0x04,
- SettingsQuoteVariable = 0x08,
- SettingsNoValue = 0x10
+ kSettingsAsList = 0x01,
+ kSettingsSingleItem = 0x02,
+ kSettingsNoQuote = 0x04,
+ kSettingsQuoteVariable = 0x08,
+ kSettingsNoValue = 0x10
};
// File properties
@@ -164,7 +164,7 @@ private:
assert(!objectName.empty());
assert(!objectType.empty());
- addProperty("isa", objectType, "", SettingsNoQuote | SettingsNoValue);
+ addProperty("isa", objectType, "", kSettingsNoQuote | kSettingsNoValue);
}
// Add a simple Property with just a name and a value
@@ -176,7 +176,7 @@ private:
std::string output;
output = "\t\t" + _parent->getHash(_id) + (_comment.empty() ? "" : " /* " + _comment + " */") + " = {";
- if (flags & SettingsAsList)
+ if (flags & kSettingsAsList)
output += "\n";
// Special case: always output the isa property first
@@ -190,7 +190,7 @@ private:
output += _parent->writeProperty(property->first, property->second, flags);
}
- if (flags & SettingsAsList)
+ if (flags & kSettingsAsList)
output += "\t\t";
output += "};\n";