[Scummvm-cvs-logs] scummvm master -> f72213672dc0cb7fd7bfebd0563d464906ba9cdf

bluegr bluegr at gmail.com
Sun Jul 19 23:34:30 CEST 2015


This automated email contains information about 31 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e69696a536 CREATE_PROJECT: Make PBXGroups use PBXFileReference-hashes instead of PBXBuildFile-hashes.
8f66bc1c92 CREATE_PROJECT: Escape \" in "<group>" for PBXFileReferences during writeFileListToProject
0395948cd3 CREATE_PROJECT: Quote lastKnownFileType, name and path to avoid breakage on c++11-compat.h
b2ff6726cd CREATE_PROJECT: Fix Info.plist path.
d6625c20bf CREATE_PROJECT: Use whatever SDK is available on OS X.
9ef6e59805 CREATE_PROJECT: Make ProjectProvider able to work properly with subclasses that want to create one single project.
7e7347f877 CREATE_PROJECT: Modify XCodeProvider to add the various folders as groups, instead of file-references, hardcoding the ro
7052823969 CREATE_PROJECT: Make sure that children of PBXGroups are always listed as a list with "," after every item, even when th
8af5d6e722 CREATE_PROJECT: Disable the WIN32-define when creating an XCode-project.
f8b054621a CREATE_PROJECT: Implement setupSourcesBuildPhase for XCode, basing it on setupResourcesBuildPhase.
bf919232e9 CREATE_PROJECT: Enable XCode-project creation.
16618acef7 CREATE_PROJECT: Explicitly add /opt/include/freetype2 to header paths.
8cd84a0152 CREATE_PROJECT: Define a group for the Frameworks, and add it to the mainGroup, so that the buildPhase can figure things
484ad4dde7 CREATE_PROJECT: Define MACOSX and POSIX in XCode-projects for now (ignoring iOS for the moment)
675bbde436 CREATE_PROJECT: Use a different producesObjectFile-function for Xcode, so that we can allow Objective-C(++) and disallow
219a43d745 CREATE_PROJECT: Revert idea about createOneProjectPerEngine.
000b80263c CREATE_PROJECT: Add macros to disable IOS-project creation for now.
790f7dc017 CREATE_PROJECT: Introduce a subclass of Object to manage group-creation.
1f13d42c6b CREATE_PROJECT: Refactor the Framework and library adding for XCode, and add the relevant Frameworks to a group.
f4a9f2035b CREATE_PROJECT: Add the product files to a group in XCode aswell (makes things easier when configuring build-schemes)
0801a553bd CREATE_PROJECT: Enable RTTI in XCode-projects.
24f9c95ee9 CREATE_PROJECT: Link against libpng and libfreetype in XCode-projects.
ff802b8eae CREATE_PROJECT: Add SRCROOT and SRCROOT/engines to USER_HEADER_SEARCH_PATHS for XCode.
7de2f25466 CREATE_PROJECT: Remove leftover _rootGroups.
e24737f142 CREATE_PROJECT: Modify producesObjectFile to take .m and .mm into account.
32b2454751 CREATE_PROJECT: Don't add -fno-rtti.
21d0210758 CREATE_PROJECT: Set projectDirPath to the source-path in XCode.
be35b8b12b CREATE_PROJECT: Use SRCROOT-relative include paths.
680b107278 CREATE_PROJECT: Link theora and jpeg in XCode-projects.
c49fd6afeb CREATE_PROJECT: Remove forced USE_TREMOR define on OS X.
f72213672d Merge pull request #591 from somaen/fix-xcode


Commit: e69696a536b500941398ca42c6eec082a8891c08
    https://github.com/scummvm/scummvm/commit/e69696a536b500941398ca42c6eec082a8891c08
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:01:48+02:00

Commit Message:
CREATE_PROJECT: Make PBXGroups use PBXFileReference-hashes instead of PBXBuildFile-hashes.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index d95bf3e..f70b359 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -193,7 +193,7 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 		std::string id = "FileReference_" + node->name;
 		FileProperty property = FileProperty(node->name, node->name, node->name, "<group>");
 
-		ADD_SETTING_ORDER_NOVALUE(children, getHash(id), node->name, order++);
+		ADD_SETTING_ORDER_NOVALUE(children, getHash(node->name), node->name, order++);
 		ADD_BUILD_FILE(id, node->name, node->name + " in Sources");
 		ADD_FILE_REFERENCE(node->name, property);
 


Commit: 8f66bc1c92d8ac61078dc1a3fb00875e608a25a2
    https://github.com/scummvm/scummvm/commit/8f66bc1c92d8ac61078dc1a3fb00875e608a25a2
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:01:52+02:00

Commit Message:
CREATE_PROJECT: Escape \" in "<group>" for PBXFileReferences during writeFileListToProject

This has to be applied explicitly, as modifying ADD_FILE_REFERENCE to use SettingsQuoteVariable would be wrong (i.e. SDKROOT should not become "SDKROOT").

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index f70b359..18ab985 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -191,7 +191,7 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 		const FileNode *node = *i;
 
 		std::string id = "FileReference_" + node->name;
-		FileProperty property = FileProperty(node->name, node->name, node->name, "<group>");
+		FileProperty property = FileProperty(node->name, node->name, node->name, "\"<group>\"");
 
 		ADD_SETTING_ORDER_NOVALUE(children, getHash(node->name), node->name, order++);
 		ADD_BUILD_FILE(id, node->name, node->name + " in Sources");


Commit: 0395948cd3d612f8b629dc16c09fd0bac0225411
    https://github.com/scummvm/scummvm/commit/0395948cd3d612f8b629dc16c09fd0bac0225411
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:01:56+02:00

Commit Message:
CREATE_PROJECT: Quote lastKnownFileType, name and path to avoid breakage on c++11-compat.h

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 18ab985..0cc16d1 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -64,9 +64,9 @@ namespace CreateProjectTool {
 #define ADD_FILE_REFERENCE(name, properties) { \
 	Object *fileRef = new Object(this, name, name, "PBXFileReference", "PBXFileReference", name); \
 	if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue); \
-	if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue); \
-	if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue); \
-	if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", 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); \
 	_fileReference.add(fileRef); \
 	_fileReference.flags = SettingsSingleItem; \


Commit: b2ff6726cd2a4cbbbd6ce9e8f9568c06f0b2bfeb
    https://github.com/scummvm/scummvm/commit/b2ff6726cd2a4cbbbd6ce9e8f9568c06f0b2bfeb
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:12+02:00

Commit Message:
CREATE_PROJECT: Fix Info.plist path.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 0cc16d1..428f35d 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -660,7 +660,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	scummvmOSX_HeaderPaths.push_back("../../engines/");
 	scummvmOSX_HeaderPaths.push_back("../../");
 	ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, SettingsNoQuote|SettingsAsList, 5);
-	ADD_SETTING_QUOTE(scummvmOSX_Debug, "INFOPLIST_FILE", "$(SRCROOT)/../macosx/Info.plist");
+	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");


Commit: d6625c20bfa27a3745b78956adbe47d20c3ff0ad
    https://github.com/scummvm/scummvm/commit/d6625c20bfa27a3745b78956adbe47d20c3ff0ad
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:15+02:00

Commit Message:
CREATE_PROJECT: Use whatever SDK is available on OS X.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 428f35d..40ed3aa 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -609,7 +609,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_CFLAGS", "");
 	ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_LDFLAGS", "-lz");
 	ADD_SETTING(scummvm_Debug, "PREBINDING", "NO");
-	ADD_SETTING(scummvm_Debug, "SDKROOT", "macosx10.6");
+	ADD_SETTING(scummvm_Debug, "SDKROOT", "macosx");
 
 	scummvm_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
 	scummvm_Debug_Object->properties["buildSettings"] = scummvm_Debug;


Commit: 9ef6e598058179e5124a75963d25e7e0936c29c4
    https://github.com/scummvm/scummvm/commit/9ef6e598058179e5124a75963d25e7e0936c29c4
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:15+02:00

Commit Message:
CREATE_PROJECT: Make ProjectProvider able to work properly with subclasses that want to create one single project.

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/create_project.h
    devtools/create_project/xcode.h



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 34d30e1..ffaa427 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1279,18 +1279,23 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 	for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
 		if (i->first == setup.projectName)
 			continue;
-
-		in.clear(); ex.clear();
+		// Retain the files between engines if we're creating a single project
+		if (createOneProjectPerEngine()) {
+			in.clear(); ex.clear();
+		}
 		const std::string moduleDir = setup.srcDir + targetFolder + i->first;
 
 		createModuleList(moduleDir, setup.defines, setup.testDirs, in, ex);
-		createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
+		if (createOneProjectPerEngine()) {
+			createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
+		}
 	}
 
 	if (setup.tests) {
 		// Create the main project file.
-		in.clear(); ex.clear();
-
+		if (createOneProjectPerEngine()) {
+			in.clear(); ex.clear();
+		}
 		createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/base", setup.defines, setup.testDirs, in, ex);
@@ -1304,8 +1309,9 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 		createProjectFile(setup.projectName, svmUUID, setup, setup.srcDir, in, ex);
 	} else if (!setup.devTools) {
 		// Last but not least create the main project file.
-		in.clear(); ex.clear();
-
+		if (createOneProjectPerEngine()) {
+			in.clear(); ex.clear();
+		}
 		// File list for the Project file
 		createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 459342a6..cea1222 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -459,6 +459,13 @@ protected:
 	virtual const char *getProjectExtension() { return ""; }
 
 	/**
+	 * Returns whether the provider produces one project per engine
+	 * allowing providers such as the XCode-project provider to disable
+	 * the logic for this in the super-class, thus merging the engine-files
+	 * into the main project instead.
+	 */
+	virtual bool createOneProjectPerEngine() const { return true; }
+	/**
 	 * Adds files of the specified directory recursively to given project file.
 	 *
 	 * @param dir Path to the directory.
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index f86e7c5..f7714e4 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -45,7 +45,8 @@ protected:
 
 	void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
-
+	// Disable multi-project creation on ProjectProvider
+	bool createOneProjectPerEngine() const { return false; }
 private:
 	enum {
 		SettingsAsList        = 0x01,


Commit: 7e7347f877e7dd3a08c8d36b397badc6b81d9ea3
    https://github.com/scummvm/scummvm/commit/7e7347f877e7dd3a08c8d36b397badc6b81d9ea3
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:16+02:00

Commit Message:
CREATE_PROJECT: Modify XCodeProvider to add the various folders as groups, instead of file-references, hardcoding the root as the group "CustomTemplate"

This also modifies the hashes, so that subfolders get unique hashes, even if they have the same name as some other folder in the tree (i.e. there are multiple folders named "sdl" in the various subfolders of backends/platforms).

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 40ed3aa..c1192d3 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -173,11 +173,27 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 
 	// Init root group
 	_groups.comment = "PBXGroup";
-
+	
+	// We use only the last path component for paths, as every folder gets its own group,
+	// and subfolders then only need to specify their path relative to their parent folder.
+	std::string path = getLastPathComponent(dir.name);
+	std::string name = path;
+	// We need to use the prefix-name to make sure that the hashes become unique for folders
+	// that have the same name.
+	std::string prefixName = objPrefix;
+	std::string groupName;
+	// Special case handling for the root-node
+	if (indentation == 0) { // Indentation level 0 is the root
+		// Hard-code the name, so that we can use it as mainGroup
+		name = "CustomTemplate";
+		// Should already be "", but lets make sure.
+		assert(prefixName == "");
+		groupName = "PBXGroup_" + name;
+	} else {
+		groupName = "PBXGroup_" + prefixName;
+	}
 	// Create group
-	std::string name = getLastPathComponent(dir.name);
-	Object *group = new Object(this, "PBXGroup_" + name , "PBXGroup", "PBXGroup", "", name);
-
+	Object *group = new Object(this, groupName , "PBXGroup", "PBXGroup", "", name);
 	// List of children
 	Property children;
 	children.hasOrder = true;
@@ -185,18 +201,32 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 
 	group->addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable);
 	group->addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable);
-
+	// Sub-groups below the root need to have their relative path set (relative to their parent group)
+	if (indentation != 0) {
+		group->addProperty("path", path, "", SettingsNoValue|SettingsQuoteVariable);
+	}
 	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, "\"<group>\"");
-
-		ADD_SETTING_ORDER_NOVALUE(children, getHash(node->name), node->name, order++);
-		ADD_BUILD_FILE(id, node->name, node->name + " in Sources");
-		ADD_FILE_REFERENCE(node->name, property);
-
+		
+		// If it is a folder, create a group with a hash made from the concatenated name of the node and
+		// all its parents, this way, the various folders with the same name (i.e. sdl a bunch of places
+		// in backends) gets unique hashes, instead of the same hash becoming the child of multiple groups.
+		if (!node->children.empty()) {
+			ADD_SETTING_ORDER_NOVALUE(children, getHash("PBXGroup_" + prefixName + node->name + "_"), node->name, order++);
+		} else {
+			// Otherwise, simply hash the filename, and hope that we don't get conflicts on those. (Seems to work so far)
+			ADD_SETTING_ORDER_NOVALUE(children, getHash(node->name), node->name, order++);
+		}
+		// Iff it is a file, then add (build) file references. Since we're using Groups and not File References
+		// for folders, we shouldn't add folders as file references, obviously.
+		if (node->children.empty()) {
+			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 + '/');


Commit: 7052823969df356b9567358d52e8012bb5459c86
    https://github.com/scummvm/scummvm/commit/7052823969df356b9567358d52e8012bb5459c86
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:16+02:00

Commit Message:
CREATE_PROJECT: Make sure that children of PBXGroups are always listed as a list with "," after every item, even when there's only one child.

This modifies the combination of SettingsAsList and SettingsSingleItem so that "," is used after the item, instead of ";", but only when they are used together.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index c1192d3..4e65107 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -231,7 +231,11 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 		if (!node->children.empty())
 			writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/');
 	}
-
+	if (order == 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)
+		children.flags |= SettingsSingleItem;
+	}
 	group->properties["children"] = children;
 
 	_groups.add(group);
@@ -877,7 +881,9 @@ std::string XCodeProvider::writeProperty(const std::string &variable, Property &
 
 		output += writeSetting((*setting).first, (*setting).second);
 
-		if ((prop.flags & SettingsAsList) && prop.settings.size() > 1) {
+		// The combination of SettingsAsList, and SettingsSingleItem 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))) {
 			output += (prop.settings.size() > 0) ? ",\n" : "\n";
 		} else {
 			output += ";";


Commit: 8af5d6e72208e96930f37f6442de71a81e8019cc
    https://github.com/scummvm/scummvm/commit/8af5d6e72208e96930f37f6442de71a81e8019cc
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:16+02:00

Commit Message:
CREATE_PROJECT: Disable the WIN32-define when creating an XCode-project.

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index ffaa427..43d3df1 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -336,7 +336,9 @@ int main(int argc, char *argv[]) {
 	setup.defines.splice(setup.defines.begin(), featureDefines);
 
 	// Windows only has support for the SDL backend, so we hardcode it here (along with winmm)
-	setup.defines.push_back("WIN32");
+	if (projectType != kProjectXcode) {
+		setup.defines.push_back("WIN32");
+	}
 	setup.defines.push_back("SDL_BACKEND");
 	if (!useSDL2) {
 		cout << "\nLinking to SDL 1.2\n\n";


Commit: f8b054621a08925f716e2468070911c9100acb0a
    https://github.com/scummvm/scummvm/commit/f8b054621a08925f716e2468070911c9100acb0a
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:16+02:00

Commit Message:
CREATE_PROJECT: Implement setupSourcesBuildPhase for XCode, basing it on setupResourcesBuildPhase.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 4e65107..590fee3 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -538,7 +538,36 @@ void XCodeProvider::setupResourcesBuildPhase() {
 }
 
 void XCodeProvider::setupSourcesBuildPhase() {
-	// TODO
+	_sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
+
+	// Setup source file properties
+	std::map<std::string, FileProperty> properties;
+
+	// Same as for containers: a rule for each native target
+	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);
+
+		Property files;
+		files.hasOrder = true;
+		files.flags = SettingsAsList;
+
+		int order = 0;
+		for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
+			if (!producesObjectFile((*file)->name)) {
+				continue;
+			}
+			std::string comment = (*file)->name + " in Sources";
+			ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->id), comment, order++);
+		}
+
+		source->properties["files"] = files;
+
+		source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+
+		_sourcesBuildPhase.add(source);
+	}
 }
 
 // Setup all build configurations


Commit: bf919232e9424e54caade5e8d789e4a6231d8e42
    https://github.com/scummvm/scummvm/commit/bf919232e9424e54caade5e8d789e4a6231d8e42
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:16+02:00

Commit Message:
CREATE_PROJECT: Enable XCode-project creation.

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 43d3df1..7b55446 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-//#define ENABLE_XCODE
+#define ENABLE_XCODE
 
 // HACK to allow building with the SDL backend on MinGW
 // see bug #1800764 "TOOLS: MinGW tools building broken"


Commit: 16618acef73baa01adfb936cd7dc73d308eec67f
    https://github.com/scummvm/scummvm/commit/16618acef73baa01adfb936cd7dc73d308eec67f
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:16+02:00

Commit Message:
CREATE_PROJECT: Explicitly add /opt/include/freetype2 to header paths.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 590fee3..f86cc9d 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -719,6 +719,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	ValueList scummvmOSX_HeaderPaths;
 	scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL");
 	scummvmOSX_HeaderPaths.push_back("/opt/local/include");
+	scummvmOSX_HeaderPaths.push_back("/opt/local/include/freetype2");
 	scummvmOSX_HeaderPaths.push_back("include/");
 	scummvmOSX_HeaderPaths.push_back("../../engines/");
 	scummvmOSX_HeaderPaths.push_back("../../");


Commit: 8cd84a0152955c1413e3360ec4e8bd5558648187
    https://github.com/scummvm/scummvm/commit/8cd84a0152955c1413e3360ec4e8bd5558648187
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:17+02:00

Commit Message:
CREATE_PROJECT: Define a group for the Frameworks, and add it to the mainGroup, so that the buildPhase can figure things out.

Changed paths:
    devtools/create_project/xcode.cpp
    devtools/create_project/xcode.h



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index f86cc9d..8989974 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -236,6 +236,12 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 		// Also this enforces the use of "," after the single item, instead of ; (see writeProperty)
 		children.flags |= SettingsSingleItem;
 	}
+	if (indentation == 0) {
+		// Add any root-groups to the very bottom (Frameworks-etc)
+		for (std::vector<Object*>::iterator it = _rootGroups.objects.begin(); it != _rootGroups.objects.end(); ++it) {
+			ADD_SETTING_ORDER_NOVALUE(children, getHash((*it)->id), (*it)->id, order++);
+		}
+	}
 	group->properties["children"] = children;
 
 	_groups.add(group);
@@ -248,6 +254,9 @@ void XCodeProvider::setupCopyFilesBuildPhase() {
 	// Nothing to do here
 }
 
+#define DEF_SYSFRAMEWORK(framework) properties[framework".framework"] = FileProperty("wrapper.framework", framework".framework", "System/Library/Frameworks/" framework ".framework", "SDKROOT"); \
+	ADD_SETTING_ORDER_NOVALUE(children, getHash(framework".framework"), framework".framework", fwOrder++);
+	
 /**
  * Sets up the frameworks build phase.
  *
@@ -256,24 +265,38 @@ void XCodeProvider::setupCopyFilesBuildPhase() {
 void XCodeProvider::setupFrameworksBuildPhase() {
 	_frameworksBuildPhase.comment = "PBXFrameworksBuildPhase";
 
+	// Just use a hardcoded id for the Frameworks-group
+	Object *frameworksGroup = new Object(this, "PBXGroup_CustomTemplate_Frameworks_" , "PBXGroup", "PBXGroup", "", "CustomTemplate_Frameworks_");
+	frameworksGroup->addProperty("name", "Frameworks", "", SettingsNoValue|SettingsQuoteVariable);
+	frameworksGroup->addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable);
+
+	Property children;
+	children.hasOrder = true;
+	children.flags = SettingsAsList;
+
 	// Setup framework file properties
 	std::map<std::string, FileProperty> properties;
-
+	int fwOrder = 0;
 	// Frameworks
-	properties["ApplicationServices.framework"] = FileProperty("wrapper.framework", "ApplicationServices.framework", "System/Library/Frameworks/ApplicationServices.framework", "SDKROOT");
-	properties["AudioToolbox.framework"]        = FileProperty("wrapper.framework", "AudioToolbox.framework", "System/Library/Frameworks/AudioToolbox.framework", "SDKROOT");
-	properties["AudioUnit.framework"]           = FileProperty("wrapper.framework", "AudioUnit.framework", "System/Library/Frameworks/AudioUnit.framework", "SDKROOT");
-	properties["Carbon.framework"]              = FileProperty("wrapper.framework", "Carbon.framework", "System/Library/Frameworks/Carbon.framework", "SDKROOT");
-	properties["Cocoa.framework"]               = FileProperty("wrapper.framework", "Cocoa.framework", "System/Library/Frameworks/Cocoa.framework", "SDKROOT");
-	properties["CoreAudio.framework"]           = FileProperty("wrapper.framework", "CoreAudio.framework", "System/Library/Frameworks/CoreAudio.framework", "SDKROOT");
-	properties["CoreFoundation.framework"]      = FileProperty("wrapper.framework", "CoreFoundation.framework", "System/Library/Frameworks/CoreFoundation.framework", "SDKROOT");
-	properties["CoreMIDI.framework"]            = FileProperty("wrapper.framework", "CoreMIDI.framework", "System/Library/Frameworks/CoreMIDI.framework", "SDKROOT");
-	properties["Foundation.framework"]          = FileProperty("wrapper.framework", "Foundation.framework", "System/Library/Frameworks/Foundation.framework", "SDKROOT");
-	properties["IOKit.framework"]               = FileProperty("wrapper.framework", "IOKit.framework", "System/Library/Frameworks/IOKit.framework", "SDKROOT");
-	properties["OpenGLES.framework"]            = FileProperty("wrapper.framework", "OpenGLES.framework", "System/Library/Frameworks/OpenGLES.framework", "SDKROOT");
-	properties["QuartzCore.framework"]          = FileProperty("wrapper.framework", "QuartzCore.framework", "System/Library/Frameworks/QuartzCore.framework", "SDKROOT");
-	properties["QuickTime.framework"]           = FileProperty("wrapper.framework", "QuickTime.framework", "System/Library/Frameworks/QuickTime.framework", "SDKROOT");
-	properties["UIKit.framework"]               = FileProperty("wrapper.framework", "UIKit.framework", "System/Library/Frameworks/UIKit.framework", "SDKROOT");
+	DEF_SYSFRAMEWORK("ApplicationServices");
+	DEF_SYSFRAMEWORK("AudioToolbox");
+	DEF_SYSFRAMEWORK("AudioUnit");
+	DEF_SYSFRAMEWORK("Carbon");
+	DEF_SYSFRAMEWORK("Cocoa");
+	DEF_SYSFRAMEWORK("CoreAudio");
+	DEF_SYSFRAMEWORK("CoreFoundation");
+	DEF_SYSFRAMEWORK("CoreMIDI");
+	DEF_SYSFRAMEWORK("Foundation");
+	DEF_SYSFRAMEWORK("IOKit");
+	DEF_SYSFRAMEWORK("OpenGLES");
+	DEF_SYSFRAMEWORK("QuartzCore");
+	DEF_SYSFRAMEWORK("QuickTime");
+	DEF_SYSFRAMEWORK("UIKit");
+
+	frameworksGroup->properties["children"] = children;
+	_groups.add(frameworksGroup);
+	// Force this to be added as a sub-group in the root.
+	_rootGroups.add(frameworksGroup);
 
 	// Local libraries
 	properties["libFLAC.a"]                     = FileProperty("archive.ar", "libFLAC.a", "lib/libFLAC.a", "\"<group>\"");
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index f7714e4..f0b0b1e 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -272,6 +272,7 @@ private:
 	ObjectList _fileReference;
 	ObjectList _frameworksBuildPhase;
 	ObjectList _groups;
+	ObjectList _rootGroups;
 	ObjectList _nativeTarget;
 	ObjectList _project;
 	ObjectList _resourcesBuildPhase;


Commit: 484ad4dde7a92c1c2cc4859601da94c66a940a5e
    https://github.com/scummvm/scummvm/commit/484ad4dde7a92c1c2cc4859601da94c66a940a5e
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:17+02:00

Commit Message:
CREATE_PROJECT: Define MACOSX and POSIX in XCode-projects for now (ignoring iOS for the moment)

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 7b55446..4113d6c 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -338,6 +338,9 @@ int main(int argc, char *argv[]) {
 	// Windows only has support for the SDL backend, so we hardcode it here (along with winmm)
 	if (projectType != kProjectXcode) {
 		setup.defines.push_back("WIN32");
+	} else {
+		setup.defines.push_back("POSIX");
+		setup.defines.push_back("MACOSX"); // This will break iOS, but allows OS X to catch up on browser_osx.
 	}
 	setup.defines.push_back("SDL_BACKEND");
 	if (!useSDL2) {


Commit: 675bbde43602581b6954505ea15df8ebe6074498
    https://github.com/scummvm/scummvm/commit/675bbde43602581b6954505ea15df8ebe6074498
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:17+02:00

Commit Message:
CREATE_PROJECT: Use a different producesObjectFile-function for Xcode, so that we can allow Objective-C(++) and disallow .asm

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 8989974..01a03d1 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -560,6 +560,18 @@ void XCodeProvider::setupResourcesBuildPhase() {
 	}
 }
 
+bool producesObjectFileOnOSX(const std::string &fileName) {
+	std::string n, ext;
+	splitFilename(fileName, n, ext);
+
+	// Note that the difference between this and the general producesObjectFile is that
+	// this one adds Objective-C(++), and removes asm-support.
+	if (ext == "cpp" || ext == "c" || ext == "m" || ext == "mm")
+		return true;
+	else
+		return false;
+}
+
 void XCodeProvider::setupSourcesBuildPhase() {
 	_sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
 
@@ -578,7 +590,7 @@ void XCodeProvider::setupSourcesBuildPhase() {
 
 		int order = 0;
 		for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
-			if (!producesObjectFile((*file)->name)) {
+			if (!producesObjectFileOnOSX((*file)->name)) {
 				continue;
 			}
 			std::string comment = (*file)->name + " in Sources";


Commit: 219a43d7458886062b30eb1e36d8f2259f388128
    https://github.com/scummvm/scummvm/commit/219a43d7458886062b30eb1e36d8f2259f388128
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:17+02:00

Commit Message:
CREATE_PROJECT: Revert idea about createOneProjectPerEngine.

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/create_project.h
    devtools/create_project/xcode.h



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 4113d6c..2f78452 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1285,22 +1285,17 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 		if (i->first == setup.projectName)
 			continue;
 		// Retain the files between engines if we're creating a single project
-		if (createOneProjectPerEngine()) {
-			in.clear(); ex.clear();
-		}
+		in.clear(); ex.clear();
+
 		const std::string moduleDir = setup.srcDir + targetFolder + i->first;
 
 		createModuleList(moduleDir, setup.defines, setup.testDirs, in, ex);
-		if (createOneProjectPerEngine()) {
-			createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
-		}
+		createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
 	}
 
 	if (setup.tests) {
 		// Create the main project file.
-		if (createOneProjectPerEngine()) {
-			in.clear(); ex.clear();
-		}
+		in.clear(); ex.clear();
 		createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/base", setup.defines, setup.testDirs, in, ex);
@@ -1314,9 +1309,7 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 		createProjectFile(setup.projectName, svmUUID, setup, setup.srcDir, in, ex);
 	} else if (!setup.devTools) {
 		// Last but not least create the main project file.
-		if (createOneProjectPerEngine()) {
-			in.clear(); ex.clear();
-		}
+		in.clear(); ex.clear();
 		// File list for the Project file
 		createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index cea1222..459342a6 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -459,13 +459,6 @@ protected:
 	virtual const char *getProjectExtension() { return ""; }
 
 	/**
-	 * Returns whether the provider produces one project per engine
-	 * allowing providers such as the XCode-project provider to disable
-	 * the logic for this in the super-class, thus merging the engine-files
-	 * into the main project instead.
-	 */
-	virtual bool createOneProjectPerEngine() const { return true; }
-	/**
 	 * Adds files of the specified directory recursively to given project file.
 	 *
 	 * @param dir Path to the directory.
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index f0b0b1e..b02cb5b 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -45,9 +45,8 @@ protected:
 
 	void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
-	// Disable multi-project creation on ProjectProvider
-	bool createOneProjectPerEngine() const { return false; }
 private:
+	std::string _projectRoot;
 	enum {
 		SettingsAsList        = 0x01,
 		SettingsSingleItem    = 0x02,


Commit: 000b80263c46287843b5859d84cfb6fcaf3363ff
    https://github.com/scummvm/scummvm/commit/000b80263c46287843b5859d84cfb6fcaf3363ff
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:17+02:00

Commit Message:
CREATE_PROJECT: Add macros to disable IOS-project creation for now.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 01a03d1..20525af 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -30,6 +30,14 @@ namespace CreateProjectTool {
 
 #define DEBUG_XCODE_HASH 0
 
+#ifdef ENABLE_IOS
+#define IOS_TARGET 0
+#define OSX_TARGET 1
+#define SIM_TARGET 2
+#else
+#define OSX_TARGET 0
+#endif
+
 #define ADD_DEFINE(defines, name) \
 	defines.push_back(name);
 
@@ -83,10 +91,13 @@ void XCodeProvider::createWorkspace(const BuildSetup &setup) {
 
 	// Setup global objects
 	setupDefines(setup);
+#ifdef ENABLE_IOS
 	_targets.push_back(PROJECT_DESCRIPTION "-iPhone");
+#endif
 	_targets.push_back(PROJECT_DESCRIPTION "-OS X");
+#ifdef ENABLE_IOS
 	_targets.push_back(PROJECT_DESCRIPTION "-Simulator");
-
+#endif
 	setupCopyFilesBuildPhase();
 	setupFrameworksBuildPhase();
 	setupNativeTarget();
@@ -304,9 +315,12 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	//properties["libmpeg2.a"]                    = FileProperty("archive.ar", "libmpeg2.a", "lib/libmpeg2.a", "\"<group>\"");
 	properties["libvorbisidec.a"]               = FileProperty("archive.ar", "libvorbisidec.a", "lib/libvorbisidec.a", "\"<group>\"");
 
+	// Declare this here, as it's used across the three targets
+	int order = 0;
+#ifdef ENABLE_IOS
 	//////////////////////////////////////////////////////////////////////////
 	// iPhone
-	Object *framework_iPhone = new Object(this, "PBXFrameworksBuildPhase_" + _targets[0], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
+	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);
@@ -329,7 +343,6 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	frameworks_iPhone.push_back("libvorbisidec.a");
 	frameworks_iPhone.push_back("OpenGLES.framework");
 
-	int order = 0;
 	for (ValueList::iterator framework = frameworks_iPhone.begin(); framework != frameworks_iPhone.end(); framework++) {
 		std::string id = "Frameworks_" + *framework + "_iphone";
 		std::string comment = *framework + " in Frameworks";
@@ -342,10 +355,10 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	framework_iPhone->properties["files"] = iPhone_files;
 
 	_frameworksBuildPhase.add(framework_iPhone);
-
+#endif
 	//////////////////////////////////////////////////////////////////////////
 	// ScummVM-OS X
-	Object *framework_OSX = new Object(this, "PBXFrameworksBuildPhase_" + _targets[1], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
+	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);
@@ -382,10 +395,10 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	framework_OSX->properties["files"] = osx_files;
 
 	_frameworksBuildPhase.add(framework_OSX);
-
+#ifdef ENABLE_IOS
 	//////////////////////////////////////////////////////////////////////////
 	// Simulator
-	Object *framework_simulator = new Object(this, "PBXFrameworksBuildPhase_" + _targets[2], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
+	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);
@@ -417,6 +430,7 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	framework_simulator->properties["files"] = simulator_files;
 
 	_frameworksBuildPhase.add(framework_simulator);
+#endif
 }
 
 void XCodeProvider::setupNativeTarget() {
@@ -424,6 +438,11 @@ void XCodeProvider::setupNativeTarget() {
 
 	// Output native target section
 	for (unsigned int i = 0; i < _targets.size(); i++) {
+#ifndef ENABLE_IOS
+		if (i != OSX_TARGET) { // TODO: Fix iOS-targets, for now just disable them.
+			continue;
+		}
+#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);
@@ -475,10 +494,18 @@ void XCodeProvider::setupProject() {
 	// List of targets
 	Property targets;
 	targets.flags = SettingsAsList;
-	targets.settings[getHash("PBXNativeTarget_" + _targets[0])] = Setting("", _targets[0], SettingsNoValue, 0, 0);
-	targets.settings[getHash("PBXNativeTarget_" + _targets[1])] = Setting("", _targets[1], SettingsNoValue, 0, 1);
-	targets.settings[getHash("PBXNativeTarget_" + _targets[2])] = Setting("", _targets[2], SettingsNoValue, 0, 2);
+#ifdef ENABLE_IOS
+	targets.settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0);
+#endif
+	targets.settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1);
+#ifdef ENABLE_IOS
+	targets.settings[getHash("PBXNativeTarget_" + _targets[SIM_TARGET])] = Setting("", _targets[SIM_TARGET], SettingsNoValue, 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;
+#endif
 
 	_project.add(project);
 }
@@ -614,9 +641,9 @@ void XCodeProvider::setupBuildConfiguration() {
 	///****************************************
 	// * iPhone
 	// ****************************************/
-
+#ifdef ENABLE_IOS
 	// Debug
-	Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Debug", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug");
+	Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Debug", _targets[IOS_TARGET] /* 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");
@@ -658,7 +685,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	iPhone_Debug_Object->properties["buildSettings"] = iPhone_Debug;
 
 	// Release
-	Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
+	Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[IOS_TARGET] /* 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");
@@ -670,7 +697,7 @@ void XCodeProvider::setupBuildConfiguration() {
 
 	_buildConfiguration.add(iPhone_Debug_Object);
 	_buildConfiguration.add(iPhone_Release_Object);
-
+#endif
 	/****************************************
 	 * scummvm
 	 ****************************************/
@@ -731,7 +758,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	 ****************************************/
 
 	// Debug
-	Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Debug", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Debug");
+	Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Debug", _targets[OSX_TARGET] /* 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");
@@ -784,7 +811,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	scummvmOSX_Debug_Object->properties["buildSettings"] = scummvmOSX_Debug;
 
 	// Release
-	Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
+	Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[OSX_TARGET] /* 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");
@@ -796,13 +823,13 @@ void XCodeProvider::setupBuildConfiguration() {
 
 	_buildConfiguration.add(scummvmOSX_Debug_Object);
 	_buildConfiguration.add(scummvmOSX_Release_Object);
-
+#ifdef ENABLE_IOS
 	/****************************************
 	 * ScummVM-Simulator
 	 ****************************************/
 
 	// Debug
-	Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Debug", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Debug");
+	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);
@@ -814,7 +841,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	scummvmSimulator_Debug_Object->properties["buildSettings"] = scummvmSimulator_Debug;
 
 	// Release
-	Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
+	Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[SIM_TARGET] /* 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");
@@ -831,7 +858,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	// Configuration List
 	_configurationList.comment = "XCConfigurationList";
 	_configurationList.flags = SettingsAsList;
-
+#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++) {
 


Commit: 790f7dc0178b05a519b9e353e8e6d542ae6d9cf9
    https://github.com/scummvm/scummvm/commit/790f7dc0178b05a519b9e353e8e6d542ae6d9cf9
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:17+02:00

Commit Message:
CREATE_PROJECT: Introduce a subclass of Object to manage group-creation.

This rewrites the way groups are created, so that the root source folder has groups created for any subfolder that is used, which allows for
merging in the engines/-subfolder automatically.

Changed paths:
    devtools/create_project/xcode.cpp
    devtools/create_project/xcode.h



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 20525af..ab94bdc 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -80,15 +80,135 @@ namespace CreateProjectTool {
 	_fileReference.flags = SettingsSingleItem; \
 }
 
+bool producesObjectFileOnOSX(const std::string &fileName) {
+	std::string n, ext;
+	splitFilename(fileName, n, ext);
+
+	// Note that the difference between this and the general producesObjectFile is that
+	// this one adds Objective-C(++), and removes asm-support.
+	if (ext == "cpp" || ext == "c" || ext == "m" || ext == "mm")
+		return true;
+	else
+		return false;
+}
+
+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);
+	
+	if (path != "") {
+		addProperty("path", path, "", SettingsNoValue|SettingsQuoteVariable);
+	}
+	_childOrder = 0;
+	_treeName = uniqueName;
+}
+
+void XCodeProvider::Group::ensureChildExists(const std::string &name) {
+	std::map<std::string, Group*>::iterator it = _childGroups.find(name);
+	if (it == _childGroups.end()) {
+		Group *child = new Group(parent, name, this->_treeName + '/' + name, name);
+		_childGroups[name] = child;
+		addChildGroup(child);
+		parent->_groups.add(child);
+	}
+}
+
+void XCodeProvider::Group::addChildInternal(const std::string &id, const std::string &comment) {
+	if (properties.find("children") == properties.end()) {
+		Property children;
+		children.hasOrder = true;
+		children.flags = SettingsAsList;
+		properties["children"] = children;
+	}
+	properties["children"].settings[id] = Setting("", comment + " in Sources", SettingsNoValue, 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;
+	} else {
+		properties["children"].flags ^= SettingsSingleItem;
+	}
+
+}
+
+void XCodeProvider::Group::addChildGroup(const Group* group) {
+	addChildInternal(parent->getHash(group->_treeName), group->_treeName);
+}
+
+void XCodeProvider::Group::addChildFile(const std::string &name) {
+	std::string id = "FileReference_" + _treeName + "/" + name;
+	addChildInternal(parent->getHash(id), name);
+	FileProperty property = FileProperty(name, name, name, "\"<group>\"");
+
+	parent->addFileReference(id, name, property);
+	if (producesObjectFileOnOSX(name)) {
+		parent->addBuildFile(_treeName + "/" + name, name, parent->getHash(id), name + " in Sources");
+	}
+}
+
+void XCodeProvider::Group::addChildByHash(const std::string &hash, const std::string &name) {
+	addChildInternal(hash, name);
+}
+
+XCodeProvider::Group *XCodeProvider::Group::getChildGroup(const std::string &name) {
+	std::map<std::string, Group*>::iterator it = _childGroups.find(name);
+	assert(it != _childGroups.end());
+	return it->second;
+}
+
+XCodeProvider::Group *XCodeProvider::touchGroupsForPath(const std::string &path) {
+	if (_rootSourceGroup == nullptr) {
+		assert (path == _projectRoot);
+		_rootSourceGroup = new Group(this, "Sources", path, path);
+		_groups.add(_rootSourceGroup);
+		return _rootSourceGroup;
+	} else {
+		assert(path.find(_projectRoot) == 0);
+		std::string subPath = path.substr(_projectRoot.size() + 1);
+		Group *currentGroup = _rootSourceGroup;
+		size_t firstPathComponent = subPath.find_first_of('/');
+		// We assume here that all paths have trailing '/', otherwise this breaks.
+		while (firstPathComponent != std::string::npos) {
+			currentGroup->ensureChildExists(subPath.substr(0, firstPathComponent));
+			currentGroup = currentGroup->getChildGroup(subPath.substr(0, firstPathComponent));
+			subPath = subPath.substr(firstPathComponent + 1);
+			firstPathComponent = subPath.find_first_of('/');
+		}
+		return currentGroup;
+	}
+}
+
+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);
+	_fileReference.add(fileRef);
+	_fileReference.flags = SettingsSingleItem;
+}
+
+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.add(buildFile);
+	_buildFile.flags = SettingsSingleItem;
+}
+
 XCodeProvider::XCodeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
 	: ProjectProvider(global_warnings, project_warnings, version) {
+	_rootSourceGroup = NULL;
 }
 
 void XCodeProvider::createWorkspace(const BuildSetup &setup) {
 	// Create project folder
 	std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj";
 	createDirectory(workspace);
-
+	_projectRoot = setup.srcDir;
+	touchGroupsForPath(_projectRoot);
+	
 	// Setup global objects
 	setupDefines(setup);
 #ifdef ENABLE_IOS
@@ -178,84 +298,20 @@ void XCodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
 void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
                                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix) {
 
-	// Add comments for shared lists
-	_buildFile.comment = "PBXBuildFile";
-	_fileReference.comment = "PBXFileReference";
-
-	// Init root group
-	_groups.comment = "PBXGroup";
-	
-	// We use only the last path component for paths, as every folder gets its own group,
-	// and subfolders then only need to specify their path relative to their parent folder.
-	std::string path = getLastPathComponent(dir.name);
-	std::string name = path;
-	// We need to use the prefix-name to make sure that the hashes become unique for folders
-	// that have the same name.
-	std::string prefixName = objPrefix;
-	std::string groupName;
-	// Special case handling for the root-node
-	if (indentation == 0) { // Indentation level 0 is the root
-		// Hard-code the name, so that we can use it as mainGroup
-		name = "CustomTemplate";
-		// Should already be "", but lets make sure.
-		assert(prefixName == "");
-		groupName = "PBXGroup_" + name;
-	} else {
-		groupName = "PBXGroup_" + prefixName;
-	}
-	// Create group
-	Object *group = new Object(this, groupName , "PBXGroup", "PBXGroup", "", name);
-	// List of children
-	Property children;
-	children.hasOrder = true;
-	children.flags = SettingsAsList;
-
-	group->addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable);
-	group->addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable);
-	// Sub-groups below the root need to have their relative path set (relative to their parent group)
-	if (indentation != 0) {
-		group->addProperty("path", path, "", SettingsNoValue|SettingsQuoteVariable);
-	}
-	int order = 0;
+	// Ensure that top-level groups are generated for i.e. engines/
+	Group *group = touchGroupsForPath(filePrefix);
 	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, "\"<group>\"");
-		
-		// If it is a folder, create a group with a hash made from the concatenated name of the node and
-		// all its parents, this way, the various folders with the same name (i.e. sdl a bunch of places
-		// in backends) gets unique hashes, instead of the same hash becoming the child of multiple groups.
-		if (!node->children.empty()) {
-			ADD_SETTING_ORDER_NOVALUE(children, getHash("PBXGroup_" + prefixName + node->name + "_"), node->name, order++);
-		} else {
-			// Otherwise, simply hash the filename, and hope that we don't get conflicts on those. (Seems to work so far)
-			ADD_SETTING_ORDER_NOVALUE(children, getHash(node->name), node->name, order++);
-		}
 		// Iff it is a file, then add (build) file references. Since we're using Groups and not File References
 		// for folders, we shouldn't add folders as file references, obviously.
 		if (node->children.empty()) {
-			ADD_BUILD_FILE(id, node->name, node->name + " in Sources");
-			ADD_FILE_REFERENCE(node->name, property);
+			group->addChildFile(node->name);
 		}
 		// Process child nodes
 		if (!node->children.empty())
 			writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/');
 	}
-	if (order == 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)
-		children.flags |= SettingsSingleItem;
-	}
-	if (indentation == 0) {
-		// Add any root-groups to the very bottom (Frameworks-etc)
-		for (std::vector<Object*>::iterator it = _rootGroups.objects.begin(); it != _rootGroups.objects.end(); ++it) {
-			ADD_SETTING_ORDER_NOVALUE(children, getHash((*it)->id), (*it)->id, order++);
-		}
-	}
-	group->properties["children"] = children;
-
-	_groups.add(group);
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -487,7 +543,7 @@ void XCodeProvider::setupProject() {
 	ADD_SETTING_ORDER_NOVALUE(regions, "German", "", 3);
 	project->properties["knownRegions"] = regions;
 
-	project->addProperty("mainGroup", getHash("PBXGroup_CustomTemplate"), "CustomTemplate", SettingsNoValue);
+	project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", SettingsNoValue);
 	project->addProperty("projectDirPath", "", "", SettingsNoValue|SettingsQuoteVariable);
 	project->addProperty("projectRoot", "", "", SettingsNoValue|SettingsQuoteVariable);
 
@@ -587,18 +643,6 @@ void XCodeProvider::setupResourcesBuildPhase() {
 	}
 }
 
-bool producesObjectFileOnOSX(const std::string &fileName) {
-	std::string n, ext;
-	splitFilename(fileName, n, ext);
-
-	// Note that the difference between this and the general producesObjectFile is that
-	// this one adds Objective-C(++), and removes asm-support.
-	if (ext == "cpp" || ext == "c" || ext == "m" || ext == "mm")
-		return true;
-	else
-		return false;
-}
-
 void XCodeProvider::setupSourcesBuildPhase() {
 	_sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
 
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index b02cb5b..792fa06 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -46,7 +46,6 @@ protected:
 	void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
 private:
-	std::string _projectRoot;
 	enum {
 		SettingsAsList        = 0x01,
 		SettingsSingleItem    = 0x02,
@@ -210,9 +209,10 @@ private:
 			return output;
 		}
 
-	private:
+	// Slight hack, to allow Group access to parent.
+	protected:
 		XCodeProvider *parent;
-
+	private:
 		// Returns the type property (should always be the first in the properties map)
 		std::string getType() {
 			assert(!properties.empty());
@@ -258,6 +258,35 @@ private:
 		}
 	};
 
+	// A class to maintain a folder-reference group-hierarchy, which together with the functionality below
+	// allows for breaking up sub-paths into a chain of groups. This helps with merging engines into the
+	// overall group-layout.
+	class Group : public Object {
+		int _childOrder;
+		std::map<std::string, Group *> _childGroups;
+		std::string _treeName;
+		void addChildInternal(const std::string &id, const std::string &comment);
+	public:
+		Group(XCodeProvider *objectParent, const std::string &groupName, const std::string &uniqueName, const std::string &path);
+		void addChildFile(const std::string &name);
+		void addChildByHash(const std::string &hash, const std::string &name);
+		// Should be passed the hash for the entry
+		void addChildGroup(const Group* group);
+		void ensureChildExists(const std::string &name);
+		Group *getChildGroup(const std::string &name);
+		std::string getHashRef() const { return parent->getHash(id); }
+	};
+
+	// The path used by the root-source group
+	std::string _projectRoot;
+	// The base source group, currently also re-purposed for containing the various support-groups.
+	Group *_rootSourceGroup;
+	// Helper function to create the chain of groups for the various subfolders. Necessary as
+	// create_project likes to start in engines/
+	Group *touchGroupsForPath(const std::string &path);
+	// Functionality for adding file-refs and build-files, as Group-objects need to be able to do this.
+	void addFileReference(const std::string &id, const std::string &name, FileProperty properties);
+	void addBuildFile(const std::string &id, const std::string &name, const std::string &fileRefId, const std::string &comment);
 	// All objects
 	std::map<std::string, std::string> _hashDictionnary;
 	ValueList _defines;


Commit: 1f13d42c6b4981e26df5342e2804f3bcdf70ad73
    https://github.com/scummvm/scummvm/commit/1f13d42c6b4981e26df5342e2804f3bcdf70ad73
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Refactor the Framework and library adding for XCode, and add the relevant Frameworks to a group.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index ab94bdc..4628cf9 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -62,15 +62,15 @@ namespace CreateProjectTool {
 #define REMOVE_SETTING(config, key) \
 	config.settings.erase(key);
 
-#define ADD_BUILD_FILE(id, name, comment) { \
+#define ADD_BUILD_FILE(id, name, fileRefId, comment) { \
 	Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment); \
-	buildFile->addProperty("fileRef", getHash(name), name, SettingsNoValue); \
+	buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue); \
 	_buildFile.add(buildFile); \
 	_buildFile.flags = SettingsSingleItem; \
 }
 
-#define ADD_FILE_REFERENCE(name, properties) { \
-	Object *fileRef = new Object(this, name, name, "PBXFileReference", "PBXFileReference", name); \
+#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); \
@@ -324,6 +324,9 @@ void XCodeProvider::setupCopyFilesBuildPhase() {
 #define DEF_SYSFRAMEWORK(framework) properties[framework".framework"] = FileProperty("wrapper.framework", framework".framework", "System/Library/Frameworks/" framework ".framework", "SDKROOT"); \
 	ADD_SETTING_ORDER_NOVALUE(children, getHash(framework".framework"), framework".framework", fwOrder++);
 	
+#define DEF_LOCALLIB_STATIC(lib) properties[lib".a"] = FileProperty("archive.ar", lib".a", "/opt/local/lib/" lib ".a", "\"<group>\""); \
+	ADD_SETTING_ORDER_NOVALUE(children, getHash(lib".a"), lib".a", fwOrder++);
+
 /**
  * Sets up the frameworks build phase.
  *
@@ -333,9 +336,7 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	_frameworksBuildPhase.comment = "PBXFrameworksBuildPhase";
 
 	// Just use a hardcoded id for the Frameworks-group
-	Object *frameworksGroup = new Object(this, "PBXGroup_CustomTemplate_Frameworks_" , "PBXGroup", "PBXGroup", "", "CustomTemplate_Frameworks_");
-	frameworksGroup->addProperty("name", "Frameworks", "", SettingsNoValue|SettingsQuoteVariable);
-	frameworksGroup->addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable);
+	Group *frameworksGroup = new Group(this, "Frameworks", "PBXGroup_CustomTemplate_Frameworks_", "");
 
 	Property children;
 	children.hasOrder = true;
@@ -359,17 +360,21 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	DEF_SYSFRAMEWORK("QuartzCore");
 	DEF_SYSFRAMEWORK("QuickTime");
 	DEF_SYSFRAMEWORK("UIKit");
+	// Optionals:
+	DEF_SYSFRAMEWORK("OpenGL");
+
+	// Local libraries
+	DEF_LOCALLIB_STATIC("libFLAC");
+	DEF_LOCALLIB_STATIC("libmad");
+	DEF_LOCALLIB_STATIC("libvorbisidec");
+	DEF_LOCALLIB_STATIC("libfreetype");
+//	DEF_LOCALLIB_STATIC("libmpeg2");
 
 	frameworksGroup->properties["children"] = children;
 	_groups.add(frameworksGroup);
 	// Force this to be added as a sub-group in the root.
-	_rootGroups.add(frameworksGroup);
+	_rootSourceGroup->addChildGroup(frameworksGroup);
 
-	// Local libraries
-	properties["libFLAC.a"]                     = FileProperty("archive.ar", "libFLAC.a", "lib/libFLAC.a", "\"<group>\"");
-	properties["libmad.a"]                      = FileProperty("archive.ar", "libmad.a", "lib/libmad.a", "\"<group>\"");
-	//properties["libmpeg2.a"]                    = FileProperty("archive.ar", "libmpeg2.a", "lib/libmpeg2.a", "\"<group>\"");
-	properties["libvorbisidec.a"]               = FileProperty("archive.ar", "libvorbisidec.a", "lib/libvorbisidec.a", "\"<group>\"");
 
 	// Declare this here, as it's used across the three targets
 	int order = 0;
@@ -404,8 +409,8 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 		std::string comment = *framework + " in Frameworks";
 
 		ADD_SETTING_ORDER_NOVALUE(iPhone_files, getHash(id), comment, order++);
-		ADD_BUILD_FILE(id, *framework, comment);
-		ADD_FILE_REFERENCE(*framework, properties[*framework]);
+		ADD_BUILD_FILE(id, *framework, getHash(*framework), comment);
+		ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
 	}
 
 	framework_iPhone->properties["files"] = iPhone_files;
@@ -437,6 +442,8 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 	frameworks_osx.push_back("IOKit.framework");
 	frameworks_osx.push_back("Cocoa.framework");
 	frameworks_osx.push_back("AudioUnit.framework");
+	// Optionals:
+	frameworks_osx.push_back("OpenGL.framework");
 
 	order = 0;
 	for (ValueList::iterator framework = frameworks_osx.begin(); framework != frameworks_osx.end(); framework++) {
@@ -444,8 +451,8 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 		std::string comment = *framework + " in Frameworks";
 
 		ADD_SETTING_ORDER_NOVALUE(osx_files, getHash(id), comment, order++);
-		ADD_BUILD_FILE(id, *framework, comment);
-		ADD_FILE_REFERENCE(*framework, properties[*framework]);
+		ADD_BUILD_FILE(id, *framework, getHash(*framework), comment);
+		ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
 	}
 
 	framework_OSX->properties["files"] = osx_files;
@@ -479,8 +486,8 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 		std::string comment = *framework + " in Frameworks";
 
 		ADD_SETTING_ORDER_NOVALUE(simulator_files, getHash(id), comment, order++);
-		ADD_BUILD_FILE(id, *framework, comment);
-		ADD_FILE_REFERENCE(*framework, properties[*framework]);
+		ADD_BUILD_FILE(id, *framework, getHash(*framework), comment);
+		ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
 	}
 
 	framework_simulator->properties["files"] = simulator_files;
@@ -623,7 +630,7 @@ void XCodeProvider::setupResourcesBuildPhase() {
 			ADD_SETTING_ORDER_NOVALUE(files, getHash(id), comment, order++);
 			// TODO Fix crash when adding build file for data
 			//ADD_BUILD_FILE(id, *file, comment);
-			ADD_FILE_REFERENCE(*file, properties[*file]);
+			ADD_FILE_REFERENCE(*file, *file, properties[*file]);
 		}
 
 		// Add custom files depending on the target


Commit: f4a9f2035b3c67051772be76d6b16cbd2a5daea5
    https://github.com/scummvm/scummvm/commit/f4a9f2035b3c67051772be76d6b16cbd2a5daea5
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Add the product files to a group in XCode aswell (makes things easier when configuring build-schemes)

Changed paths:
    devtools/create_project/xcode.cpp
    devtools/create_project/xcode.h



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 4628cf9..ef15683 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -189,6 +189,16 @@ void XCodeProvider::addFileReference(const std::string &id, const std::string &n
 	_fileReference.flags = SettingsSingleItem;
 }
 
+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);
+	_fileReference.add(fileRef);
+	_fileReference.flags = SettingsSingleItem;
+}
+
 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);
@@ -499,6 +509,8 @@ void XCodeProvider::setupFrameworksBuildPhase() {
 void XCodeProvider::setupNativeTarget() {
 	_nativeTarget.comment = "PBXNativeTarget";
 
+	// Just use a hardcoded id for the Products-group
+	Group *productsGroup = new Group(this, "Products", "PBXGroup_CustomTemplate_Products_" , "");
 	// Output native target section
 	for (unsigned int i = 0; i < _targets.size(); i++) {
 #ifndef ENABLE_IOS
@@ -524,11 +536,15 @@ void XCodeProvider::setupNativeTarget() {
 
 		target->addProperty("name", _targets[i], "", SettingsNoValue|SettingsQuoteVariable);
 		target->addProperty("productName", PROJECT_NAME, "", SettingsNoValue);
+		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);
 
 		_nativeTarget.add(target);
 	}
+	_rootSourceGroup->addChildGroup(productsGroup);
+	_groups.add(productsGroup);
 }
 
 void XCodeProvider::setupProject() {
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index 792fa06..7b16bd2 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -286,6 +286,7 @@ private:
 	Group *touchGroupsForPath(const std::string &path);
 	// Functionality for adding file-refs and build-files, as Group-objects need to be able to do this.
 	void addFileReference(const std::string &id, const std::string &name, FileProperty properties);
+	void addProductFileReference(const std::string &id, const std::string &name);
 	void addBuildFile(const std::string &id, const std::string &name, const std::string &fileRefId, const std::string &comment);
 	// All objects
 	std::map<std::string, std::string> _hashDictionnary;


Commit: 0801a553bdf7df3c1c1c116b5c8917b8e3d63610
    https://github.com/scummvm/scummvm/commit/0801a553bdf7df3c1c1c116b5c8917b8e3d63610
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Enable RTTI in XCode-projects.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index ef15683..082fefa 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -779,7 +779,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	ADD_SETTING_QUOTE(scummvm_Debug, "FRAMEWORK_SEARCH_PATHS", "");
 	ADD_SETTING(scummvm_Debug, "GCC_C_LANGUAGE_STANDARD", "c99");
 	ADD_SETTING(scummvm_Debug, "GCC_ENABLE_CPP_EXCEPTIONS", "NO");
-	ADD_SETTING(scummvm_Debug, "GCC_ENABLE_CPP_RTTI", "NO");
+	ADD_SETTING(scummvm_Debug, "GCC_ENABLE_CPP_RTTI", "YES");
 	ADD_SETTING(scummvm_Debug, "GCC_INPUT_FILETYPE", "automatic");
 	ADD_SETTING(scummvm_Debug, "GCC_OPTIMIZATION_LEVEL", "0");
 	ValueList scummvm_defines(_defines);
@@ -834,7 +834,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	ADD_SETTING_QUOTE(scummvmOSX_Debug, "FRAMEWORK_SEARCH_PATHS", "");
 	ADD_SETTING(scummvmOSX_Debug, "GCC_C_LANGUAGE_STANDARD", "c99");
 	ADD_SETTING(scummvmOSX_Debug, "GCC_ENABLE_CPP_EXCEPTIONS", "NO");
-	ADD_SETTING(scummvmOSX_Debug, "GCC_ENABLE_CPP_RTTI", "NO");
+	ADD_SETTING(scummvmOSX_Debug, "GCC_ENABLE_CPP_RTTI", "YES");
 	ADD_SETTING(scummvmOSX_Debug, "GCC_DYNAMIC_NO_PIC", "NO");
 	ADD_SETTING(scummvmOSX_Debug, "GCC_ENABLE_FIX_AND_CONTINUE", "NO");
 	ADD_SETTING(scummvmOSX_Debug, "GCC_OPTIMIZATION_LEVEL", "0");


Commit: 24f9c95ee958724a4d59efc4a39c1dcdbe5560de
    https://github.com/scummvm/scummvm/commit/24f9c95ee958724a4d59efc4a39c1dcdbe5560de
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Link against libpng and libfreetype in XCode-projects.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 082fefa..c9f0448 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -864,6 +864,8 @@ void XCodeProvider::setupBuildConfiguration() {
 	ValueList scummvmOSX_LdFlags;
 	scummvmOSX_LdFlags.push_back("-lSDLmain");
 	scummvmOSX_LdFlags.push_back("-logg");
+	scummvmOSX_LdFlags.push_back("-lpng");
+	scummvmOSX_LdFlags.push_back("-lfreetype");
 	scummvmOSX_LdFlags.push_back("-lvorbisfile");
 	scummvmOSX_LdFlags.push_back("-lvorbis");
 	scummvmOSX_LdFlags.push_back("-lmad");


Commit: ff802b8eae3c9c378279e8596ca25d59c586818a
    https://github.com/scummvm/scummvm/commit/ff802b8eae3c9c378279e8596ca25d59c586818a
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Add SRCROOT and SRCROOT/engines to USER_HEADER_SEARCH_PATHS for XCode.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index c9f0448..1406f2d 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -773,6 +773,7 @@ void XCodeProvider::setupBuildConfiguration() {
 	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, "USER_HEADER_SEARCH_PATHS", "$(SRCROOT) $(SRCROOT)/engines");
 	ADD_SETTING_QUOTE(scummvm_Debug, "ARCHS", "$(ARCHS_STANDARD_32_BIT)");
 	ADD_SETTING_QUOTE(scummvm_Debug, "CODE_SIGN_IDENTITY", "Don't Code Sign");
 	ADD_SETTING_QUOTE_VAR(scummvm_Debug, "CODE_SIGN_IDENTITY[sdk=iphoneos*]", "Don't Code Sign");


Commit: 7de2f25466b2aa227147a537c09588e37ec33c77
    https://github.com/scummvm/scummvm/commit/7de2f25466b2aa227147a537c09588e37ec33c77
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Remove leftover _rootGroups.

Changed paths:
    devtools/create_project/xcode.h



diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index 7b16bd2..d49be93 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -301,7 +301,6 @@ private:
 	ObjectList _fileReference;
 	ObjectList _frameworksBuildPhase;
 	ObjectList _groups;
-	ObjectList _rootGroups;
 	ObjectList _nativeTarget;
 	ObjectList _project;
 	ObjectList _resourcesBuildPhase;


Commit: e24737f142112776ede892c9ba4091b09dafe68c
    https://github.com/scummvm/scummvm/commit/e24737f142112776ede892c9ba4091b09dafe68c
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:18+02:00

Commit Message:
CREATE_PROJECT: Modify producesObjectFile to take .m and .mm into account.

This should be safe outside XCode, as only OSX/iOS-projects introduce such files to begin with.

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 2f78452..42f4466 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1044,7 +1044,7 @@ bool producesObjectFile(const std::string &fileName) {
 	std::string n, ext;
 	splitFilename(fileName, n, ext);
 
-	if (ext == "cpp" || ext == "c" || ext == "asm")
+	if (ext == "cpp" || ext == "c" || ext == "asm" || ext == "m" || ext == "mm")
 		return true;
 	else
 		return false;


Commit: 32b245475117abe37a9f5b1002a423dfffb8d87d
    https://github.com/scummvm/scummvm/commit/32b245475117abe37a9f5b1002a423dfffb8d87d
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:02:19+02:00

Commit Message:
CREATE_PROJECT: Don't add -fno-rtti.

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 42f4466..2e4e53d 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -415,7 +415,6 @@ 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.
-		globalWarnings.push_back("-fno-rtti");
 		globalWarnings.push_back("-fno-exceptions");
 		globalWarnings.push_back("-fcheck-new");
 


Commit: 21d0210758a5aac44a660f1fd017395c311eed90
    https://github.com/scummvm/scummvm/commit/21d0210758a5aac44a660f1fd017395c311eed90
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:27:21+02:00

Commit Message:
CREATE_PROJECT: Set projectDirPath to the source-path in XCode.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 1406f2d..f8d7f15 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -567,7 +567,7 @@ void XCodeProvider::setupProject() {
 	project->properties["knownRegions"] = regions;
 
 	project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", SettingsNoValue);
-	project->addProperty("projectDirPath", "", "", SettingsNoValue|SettingsQuoteVariable);
+	project->addProperty("projectDirPath", _projectRoot, "", SettingsNoValue|SettingsQuoteVariable);
 	project->addProperty("projectRoot", "", "", SettingsNoValue|SettingsQuoteVariable);
 
 	// List of targets


Commit: be35b8b12ba8424859b3381449186a3586ab62c8
    https://github.com/scummvm/scummvm/commit/be35b8b12ba8424859b3381449186a3586ab62c8
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:35:54+02:00

Commit Message:
CREATE_PROJECT: Use SRCROOT-relative include paths.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index f8d7f15..4c9f1cf 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -731,10 +731,10 @@ void XCodeProvider::setupBuildConfiguration() {
 	ADD_SETTING(iPhone_Debug, "GCC_THUMB_SUPPORT", "NO");
 	ADD_SETTING(iPhone_Debug, "GCC_UNROLL_LOOPS", "YES");
 	ValueList iPhone_HeaderSearchPaths;
-	iPhone_HeaderSearchPaths.push_back("../../engines/");
-	iPhone_HeaderSearchPaths.push_back("../../");
+	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|SettingsNoQuote, 5);
+	ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, SettingsAsList|SettingsQuoteVariable, 5);
 	ADD_SETTING(iPhone_Debug, "INFOPLIST_FILE", "Info.plist");
 	ValueList iPhone_LibPaths;
 	iPhone_LibPaths.push_back("$(inherited)");
@@ -794,9 +794,9 @@ void XCodeProvider::setupBuildConfiguration() {
 	ADD_SETTING(scummvm_Debug, "GCC_WARN_UNUSED_VARIABLE", "YES");
 	ValueList scummvm_HeaderPaths;
 	scummvm_HeaderPaths.push_back("include/");
-	scummvm_HeaderPaths.push_back("../../engines/");
-	scummvm_HeaderPaths.push_back("../../");
-	ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, SettingsNoQuote|SettingsAsList, 5);
+	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_QUOTE(scummvm_Debug, "LIBRARY_SEARCH_PATHS", "");
 	ADD_SETTING(scummvm_Debug, "ONLY_ACTIVE_ARCH", "YES");
 	ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_CFLAGS", "");
@@ -851,9 +851,9 @@ void XCodeProvider::setupBuildConfiguration() {
 	scummvmOSX_HeaderPaths.push_back("/opt/local/include");
 	scummvmOSX_HeaderPaths.push_back("/opt/local/include/freetype2");
 	scummvmOSX_HeaderPaths.push_back("include/");
-	scummvmOSX_HeaderPaths.push_back("../../engines/");
-	scummvmOSX_HeaderPaths.push_back("../../");
-	ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, SettingsNoQuote|SettingsAsList, 5);
+	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_QUOTE(scummvmOSX_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/macosx/Info.plist");
 	ValueList scummvmOSX_LibPaths;
 	scummvmOSX_LibPaths.push_back("/sw/lib");


Commit: 680b10727839f6b4ec088d9219c0384aa1240589
    https://github.com/scummvm/scummvm/commit/680b10727839f6b4ec088d9219c0384aa1240589
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:39:11+02:00

Commit Message:
CREATE_PROJECT: Link theora and jpeg in XCode-projects.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 4c9f1cf..3f0fb9a 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -866,6 +866,8 @@ void XCodeProvider::setupBuildConfiguration() {
 	scummvmOSX_LdFlags.push_back("-lSDLmain");
 	scummvmOSX_LdFlags.push_back("-logg");
 	scummvmOSX_LdFlags.push_back("-lpng");
+	scummvmOSX_LdFlags.push_back("-ljpeg");
+	scummvmOSX_LdFlags.push_back("-ltheora");
 	scummvmOSX_LdFlags.push_back("-lfreetype");
 	scummvmOSX_LdFlags.push_back("-lvorbisfile");
 	scummvmOSX_LdFlags.push_back("-lvorbis");


Commit: c49fd6afeb547a25f39494745cd2bd28fd4b6834
    https://github.com/scummvm/scummvm/commit/c49fd6afeb547a25f39494745cd2bd28fd4b6834
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2015-04-09T20:41:16+02:00

Commit Message:
CREATE_PROJECT: Remove forced USE_TREMOR define on OS X.

Changed paths:
    devtools/create_project/xcode.cpp



diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 3f0fb9a..5edbb29 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -970,7 +970,6 @@ void XCodeProvider::setupDefines(const BuildSetup &setup) {
 	ADD_DEFINE(_defines, "SCUMM_LITTLE_ENDIAN");
 	ADD_DEFINE(_defines, "UNIX");
 	ADD_DEFINE(_defines, "SCUMMVM");
-	ADD_DEFINE(_defines, "USE_TREMOR");
 }
 
 //////////////////////////////////////////////////////////////////////////


Commit: f72213672dc0cb7fd7bfebd0563d464906ba9cdf
    https://github.com/scummvm/scummvm/commit/f72213672dc0cb7fd7bfebd0563d464906ba9cdf
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-20T00:32:21+03:00

Commit Message:
Merge pull request #591 from somaen/fix-xcode

CREATE_PROJECT: Fix XCode-project generation.

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/xcode.cpp
    devtools/create_project/xcode.h









More information about the Scummvm-git-logs mailing list