diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-04-12 15:15:03 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-04-12 15:15:03 +0000 |
| commit | 9100fc0b51969cbb2ae83d1d355bf584dd00d406 (patch) | |
| tree | ebe240ef8545c7ac8787a93cd8120b42c8f9d853 | |
| parent | 9604b556b82f1c858bae5271adf2de8d79461231 (diff) | |
Solved MSWin type conflict UUID
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7487 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | fluid/ide_maketools.cxx | 28 | ||||
| -rw-r--r-- | fluid/ide_support.cxx | 4 | ||||
| -rw-r--r-- | fluid/ide_support.h | 17 | ||||
| -rw-r--r-- | fluid/ide_xcode.cxx | 40 |
4 files changed, 53 insertions, 36 deletions
diff --git a/fluid/ide_maketools.cxx b/fluid/ide_maketools.cxx index 68c0872a8..e8d796bda 100644 --- a/fluid/ide_maketools.cxx +++ b/fluid/ide_maketools.cxx @@ -62,11 +62,11 @@ class Maketools_IDE { char *rootDir; char projectName[80]; - Fl_Preferences tgtAppsDB; + Fl_IDE_Prefs tgtAppsDB; int nTgtApps; - Fl_Preferences tgtLibsDB; + Fl_IDE_Prefs tgtLibsDB; int nTgtLibs; - Fl_Preferences tgtTestsDB; + Fl_IDE_Prefs tgtTestsDB; int nTgtTests; Fl_Preferences filesDB; int nFiles; @@ -223,6 +223,15 @@ public: } int writeFluidMakefile(const char *filepath) { + int i, n; + + Fl_Preferences::ID fluidID = tgtAppsDB.find_by_key("name", "Fluid"); + if (!fluidID) { + fprintf(stderr, "Target \"Fluid\" not found!\n"); + return -1; + } + Fl_Target_Prefs fluidDB(fluidID); + FILE *f = fopen(filepath, "wb"); fputs("#\n", f); fputs("# \"$Id: Makefile 6614 2009-01-01 16:11:32Z matt $\"\n", f); @@ -252,6 +261,18 @@ public: fputs("#\n", f); fputs("\n", f); fputs("CPPFILES = \\\n", f); + + Fl_Preferences sourcesDB(fluidDB, "sources"); + n = sourcesDB.groups(); + for (i=0; i<n; i++) { + Fl_Preferences sourceDB(sourcesDB, i); + GET_UUID(refUUID, sourceDB); + Fl_File_Prefs fileDB(filesDB, refUUID); + fprintf(f, "\t%s", fileDB.fullName()); + if (i<n-1) fputs(" \\", f); + fputs("\n", f); + } +/* fputs("\tCodeEditor.cxx \\\n", f); fputs("\tFl_Function_Type.cxx \\\n", f); fputs("\tFl_Group_Type.cxx \\\n", f); @@ -275,6 +296,7 @@ public: fputs("\ttemplate_panel.cxx \\\n", f); fputs("\tundo.cxx \\\n", f); fputs("\twidget_panel.cxx\n", f); +*/ fputs("\n", f); fputs("################################################################\n", f); fputs("\n", f); diff --git a/fluid/ide_support.cxx b/fluid/ide_support.cxx index f9abb2d8d..9f9e9f755 100644 --- a/fluid/ide_support.cxx +++ b/fluid/ide_support.cxx @@ -114,7 +114,7 @@ /* * Read a UUID from a database entry. If none exists, create one in the database. */ -void getUUID(Fl_Preferences &db, const char *key, char *buffer) { +void fl_getUUID(Fl_Preferences &db, const char *key, char *buffer) { db.get(key, buffer, "", 37); if (buffer[0]==0) { strcpy(buffer, Fl_Preferences::newUUID()); @@ -126,7 +126,7 @@ void getUUID(Fl_Preferences &db, const char *key, char *buffer) { * Read an Xcode ID from a database entry. If none exists, create one in the database. * The Xcode ID contains 24 bytes of hexadecimal chracters. */ -void getXCID(Fl_Preferences &db, const char *key, char *buffer) { +void fl_getXCID(Fl_Preferences &db, const char *key, char *buffer) { db.get(key, buffer, "", 25); if (buffer[0]==0) { const char *uuid = Fl_Preferences::newUUID(); diff --git a/fluid/ide_support.h b/fluid/ide_support.h index 7bd11e471..20721b021 100644 --- a/fluid/ide_support.h +++ b/fluid/ide_support.h @@ -32,21 +32,16 @@ #include <FL/Fl_Preferences.H> -#ifndef WIN32 -/* Remove this typedef from win32 builds, it seems it clashes - * with existing symbol names. It does not appear to be used. */ -typedef char UUID[40]; -#endif -typedef char XCID[25]; - +typedef char Fl_UUID[40]; +typedef char Fl_XCID[25]; -extern void getUUID(Fl_Preferences &db, const char *key, char *buffer); -extern void getXCID(Fl_Preferences &db, const char *key, char *buffer); +extern void fl_getUUID(Fl_Preferences &db, const char *key, char *buffer); +extern void fl_getXCID(Fl_Preferences &db, const char *key, char *buffer); /* Shortcut to retrieve or create a UUID from the database */ #define MAKE_UUID(name, db) \ - char name[40]; getUUID(db, #name, name); + char name[40]; fl_getUUID(db, #name, name); /* Shortcut to retrieve, but not create a UUID from the database */ #define GET_UUID(name, db) \ @@ -54,7 +49,7 @@ extern void getXCID(Fl_Preferences &db, const char *key, char *buffer); /* Shortcut to retrieve or create a UUID from the database */ #define MAKE_XCID(name, db) \ -char name[25]; getXCID(db, #name, name); +char name[25]; fl_getXCID(db, #name, name); /* Shortcut to retrieve, but not create a UUID from the database */ #define GET_XCID(name, db) \ diff --git a/fluid/ide_xcode.cxx b/fluid/ide_xcode.cxx index 880a85fbe..fdc24d346 100644 --- a/fluid/ide_xcode.cxx +++ b/fluid/ide_xcode.cxx @@ -115,15 +115,15 @@ class Xcode3_IDE { Fl_Preferences filesDB; int nFiles; Fl_Preferences ideDB; - XCID xcRootNodeID; - XCID xcBuildConfigurationListID; - XCID xcMainGroupID; - XCID xcProductsGroupID; - XCID xcAppsGroupID; - XCID xcLibsGroupID; - XCID xcTestsGroupID; - XCID xcBuildConfigurationDebugID; - XCID xcBuildConfigurationReleaseID; + Fl_XCID xcRootNodeID; + Fl_XCID xcBuildConfigurationListID; + Fl_XCID xcMainGroupID; + Fl_XCID xcProductsGroupID; + Fl_XCID xcAppsGroupID; + Fl_XCID xcLibsGroupID; + Fl_XCID xcTestsGroupID; + Fl_XCID xcBuildConfigurationDebugID; + Fl_XCID xcBuildConfigurationReleaseID; public: Xcode3_IDE(Fl_Preferences &db, const char *rootDirA) : rootDir(strdup(rootDirA)), @@ -138,15 +138,15 @@ public: nTgtLibs = tgtLibsDB.groups(); nTgtTests = tgtTestsDB.groups(); nFiles = filesDB.groups(); - getXCID(ideDB, "xcRootNodeID", xcRootNodeID); - getXCID(ideDB, "xcBuildConfigurationListID", xcBuildConfigurationListID); - getXCID(ideDB, "xcMainGroupID", xcMainGroupID); - getXCID(ideDB, "xcProductsGroupID", xcProductsGroupID); - getXCID(ideDB, "xcAppsGroupID", xcAppsGroupID); - getXCID(ideDB, "xcLibsGroupID", xcLibsGroupID); - getXCID(ideDB, "xcTestsGroupID", xcTestsGroupID); - getXCID(ideDB, "xcBuildConfigurationDebugID", xcBuildConfigurationDebugID); - getXCID(ideDB, "xcBuildConfigurationReleaseID", xcBuildConfigurationReleaseID); + fl_getXCID(ideDB, "xcRootNodeID", xcRootNodeID); + fl_getXCID(ideDB, "xcBuildConfigurationListID", xcBuildConfigurationListID); + fl_getXCID(ideDB, "xcMainGroupID", xcMainGroupID); + fl_getXCID(ideDB, "xcProductsGroupID", xcProductsGroupID); + fl_getXCID(ideDB, "xcAppsGroupID", xcAppsGroupID); + fl_getXCID(ideDB, "xcLibsGroupID", xcLibsGroupID); + fl_getXCID(ideDB, "xcTestsGroupID", xcTestsGroupID); + fl_getXCID(ideDB, "xcBuildConfigurationDebugID", xcBuildConfigurationDebugID); + fl_getXCID(ideDB, "xcBuildConfigurationReleaseID", xcBuildConfigurationReleaseID); } ~Xcode3_IDE() { if (rootDir) free(rootDir); @@ -752,11 +752,11 @@ public: MAKE_XCID(xcTargetID, targetDB); MAKE_XCID(xcBuildConfigurationListID, targetDB); char xcBuildHeadersID[25], xcBuildCopyFilesID[25]; - if (fmwk) getXCID(targetDB, "xcBuildHeadersID", xcBuildHeadersID); + if (fmwk) fl_getXCID(targetDB, "xcBuildHeadersID", xcBuildHeadersID); MAKE_XCID(xcBuildResourcesID, targetDB); MAKE_XCID(xcBuildSourcesID, targetDB); MAKE_XCID(xcBuildFrameworksID, targetDB); - if (!fmwk) getXCID(targetDB, "xcBuildCopyFilesID", xcBuildCopyFilesID); + if (!fmwk) fl_getXCID(targetDB, "xcBuildCopyFilesID", xcBuildCopyFilesID); MAKE_XCID(xcProductID, targetDB); MAKE_XCID(xcBuildRuleFlID, targetDB); fprintf(out, "\t\t%s /* %s */ = {\n", xcTargetID, name); |
