From 2f82fd066321cde3e225fc87a9469849215413eb Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 20 Feb 2010 21:14:47 +0000 Subject: Mixed bag. Please see CHANGES. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/ide_xcode.cxx | 174 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 139 insertions(+), 35 deletions(-) (limited to 'fluid/ide_xcode.cxx') diff --git a/fluid/ide_xcode.cxx b/fluid/ide_xcode.cxx index d35e38439..0ea3d8f83 100644 --- a/fluid/ide_xcode.cxx +++ b/fluid/ide_xcode.cxx @@ -116,7 +116,9 @@ class Xcode3_IDE { XCID xcBuildConfigurationListID; XCID xcMainGroupID; XCID xcProductsGroupID; - XCID xcFilesGroupID; + XCID xcAppsGroupID; + XCID xcLibsGroupID; + XCID xcTestsGroupID; XCID xcBuildConfigurationDebugID; XCID xcBuildConfigurationReleaseID; public: @@ -137,7 +139,9 @@ public: getXCID(ideDB, "xcBuildConfigurationListID", xcBuildConfigurationListID); getXCID(ideDB, "xcMainGroupID", xcMainGroupID); getXCID(ideDB, "xcProductsGroupID", xcProductsGroupID); - getXCID(ideDB, "xcFilesGroupID", xcFilesGroupID); + getXCID(ideDB, "xcAppsGroupID", xcAppsGroupID); + getXCID(ideDB, "xcLibsGroupID", xcLibsGroupID); + getXCID(ideDB, "xcTestsGroupID", xcTestsGroupID); getXCID(ideDB, "xcBuildConfigurationDebugID", xcBuildConfigurationDebugID); getXCID(ideDB, "xcBuildConfigurationReleaseID", xcBuildConfigurationReleaseID); } @@ -195,8 +199,8 @@ public: MAKE_XCID(xcBuildFrameworkID, extDB); Fl_File_Prefs fileDB(filesDB, refUUID); MAKE_XCID(xcFileID, fileDB); - const char *name = fileDB.fileName(); - fprintf(out, "\t\t%s /* lib%s.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = %s /* lib%s.dylib */; };\n", xcBuildFrameworkID, name, xcFileID, name); + const char *fullName = fileDB.fullName(); + fprintf(out, "\t\t%s /* %s in Frameworks */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };\n", xcBuildFrameworkID, fullName, xcFileID, fullName); } return 0; } @@ -240,6 +244,7 @@ public: fprintf(out, "\t\t\t);\n"); fprintf(out, "\t\t\tscript = \"export DYLD_FRAMEWORK_PATH=${TARGET_BUILD_DIR} && cd ../../test && ${TARGET_BUILD_DIR}/Fluid.app/Contents/MacOS/Fluid -c ${INPUT_FILE_NAME}\";\n"); fprintf(out, "\t\t};\n"); + return 0; } /* @@ -374,7 +379,7 @@ public: * A list of all files that are somehow referenced in this project */ int writeFileReferenceSection(FILE *out) { - int i, j; + int i; fprintf(out, "/* Begin PBXFileReference section */\n"); // --- list of all Application target results for (i=0; i\"; };\n", - xcFileID, fileDB.fileName(), fileDB.fileName() ); + xcFileID, fullName, fullName, pathAndName ); + filetype = 0L; + } else if (strcmp(ext, ".framework")==0) { + fprintf(out, + "\t\t%s /* %s */ = {isa = PBXFileReference; " + "lastKnownFileType = \"wrapper.framework\"; " + "name = %s; path = %s; " + "sourceTree = \"\"; };\n", + xcFileID, fullName, fullName, pathAndName ); filetype = 0L; } else if (strcmp(ext, ".plist")==0) { filetype = "text.plist.xml"; @@ -510,7 +524,13 @@ public: * */ int writeTargetFiles(FILE *out, Fl_Preferences &targetDB) { - char name[80]; targetDB.get("name", name, "DBERROR", 80); + char name[80]; + MAKE_XCID(xcTargetGroupID, targetDB); + targetDB.get("name", name, "DBERROR", 80); + fprintf(out, "\t\t%s /* %s */ = {\n", xcTargetGroupID, name); + fprintf(out, "\t\t\tisa = PBXGroup;\n"); + fprintf(out, "\t\t\tchildren = (\n"); + MAKE_XCID(xcProductID, targetDB); Fl_Preferences sourcesDB(targetDB, "sources"); int j, n = sourcesDB.groups(); @@ -539,23 +559,32 @@ public: GET_UUID(refUUID, extDB); Fl_File_Prefs fileDB(filesDB, refUUID); MAKE_XCID(xcFileID, fileDB); - const char *name = fileDB.fileName(); - fprintf(out, "\t\t\t\t%s /* lib%s.dylib */,\n", xcFileID, name); + const char *fullName = fileDB.fullName(); + fprintf(out, "\t\t\t\t%s /* %s */,\n", xcFileID, fullName); } + + fprintf(out, "\t\t\t);\n"); + fprintf(out, "\t\t\tname = %s;\n", name); + fprintf(out, "\t\t\tsourceTree = \"\";\n"); + fprintf(out, "\t\t};\n"); + return 0; } /* * Groups define the folder hierarchy in the "Groups & Files" panel */ int writeGroupSection(FILE *out) { - int i, j; + int i; + char name[80]; fprintf(out, "/* Begin PBXGroup section */\n"); // --- FIXME: missing "icons" group // --- main group fprintf(out, "\t\t%s = {\n", xcMainGroupID); fprintf(out, "\t\t\tisa = PBXGroup;\n"); fprintf(out, "\t\t\tchildren = (\n"); - fprintf(out, "\t\t\t\t%s /* Files */,\n", xcFilesGroupID); // link to "Files" group + fprintf(out, "\t\t\t\t%s /* Applications */,\n", xcAppsGroupID); + fprintf(out, "\t\t\t\t%s /* Frameworks */,\n", xcLibsGroupID); + fprintf(out, "\t\t\t\t%s /* Tests */,\n", xcTestsGroupID); fprintf(out, "\t\t\t\t%s /* Products */,\n", xcProductsGroupID); // link to "Products" group fprintf(out, "\t\t\t);\n"); fprintf(out, "\t\t\tsourceTree = \"\";\n"); @@ -594,28 +623,63 @@ public: // --- FIXME: missing "jpeg Sources" group // --- FIXME: missing "png Sources" group // --- FIXME: missing "libs" group - - // --- "Files" group for testing - fprintf(out, "\t\t%s /* Files */ = {\n", xcFilesGroupID); + + // --- "Applications" group for testing + fprintf(out, "\t\t%s /* Applications */ = {\n", xcAppsGroupID); fprintf(out, "\t\t\tisa = PBXGroup;\n"); fprintf(out, "\t\t\tchildren = (\n"); + for (i=0; i\";\n"); + fprintf(out, "\t\t};\n"); for (i=0; i\";\n"); + fprintf(out, "\t\t};\n"); for (i=0; i\";\n"); fprintf(out, "\t\t};\n"); + for (i=0; i