[mapguide-commits] r9761 - sandbox/jng/vanilla_swig/Bindings/src/IMake

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Nov 10 02:05:25 PST 2020


Author: jng
Date: 2020-11-10 02:05:25 -0800 (Tue, 10 Nov 2020)
New Revision: 9761

Modified:
   sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp
Log:
IMake update to support a custom prefix for the properties file (needed for the split layout)

Modified: sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp	2020-11-06 18:02:26 UTC (rev 9760)
+++ sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp	2020-11-10 10:05:25 UTC (rev 9761)
@@ -13,7 +13,7 @@
     java
 };
 
-static char version[] = "1.5.0";
+static char version[] = "1.5.1";
 static char EXTERNAL_API_DOCUMENTATION[] = "(NOTE: This API is not officially supported and may be subject to removal in a future release without warning. Use with caution.)";
 
 static string module;
@@ -25,6 +25,7 @@
 static string typedefs;
 static string nameSpace;
 static string package;
+static string propertiesFilePrefix;
 static set<string> classesWithDocs;
 static map<string, string> typeReplacements;
 static map<string, bool> classes;
@@ -1455,7 +1456,8 @@
                                 fname.append("/");
                         #endif
                         }
-                        fname.append("MapGuideApi_Properties.i");
+                        fname.append(propertiesFilePrefix);
+                        fname.append("_Properties.i");
                         //fname.append(className);
                         //fname.append("Prop");
                         propertyFile = fopen(fname.c_str(),"a+");
@@ -1941,11 +1943,13 @@
         TCLAP::ValueArg<std::string> argLanguage("l", "language", "The language to generate for", true, "PHP|C#|Java", "string");
         TCLAP::ValueArg<std::string> argOutput("o", "output", "The file or directory where generated files are output to", false, ".", "string");
         TCLAP::ValueArg<std::string> argRelRoot("r", "rel-root", "Defines where headers will be resolved relative to", false, ".", "string");
+        TCLAP::ValueArg<std::string> argPropertyPrefix("x", "properties-prefix", "Defines the prefix to use for the properties file name (default: MapGuideApi)", false, "MapGuideApi", "string");
 
         cmd.add(argInputFile);
         cmd.add(argLanguage);
         cmd.add(argOutput);
         cmd.add(argRelRoot);
+        cmd.add(argPropertyPrefix);
 
         TCLAP::SwitchArg argTranslateMode("t", "translate-mode", "Enable translate (generate constants) mode", cmd, false);
         TCLAP::SwitchArg argAbsPaths("a", "absolute-paths", "Disable relative path resolution in headers. Header paths are assumed to be absolute", cmd, false);
@@ -1989,6 +1993,7 @@
         }
         outDir = argOutput.getValue();
         relRoot = argRelRoot.getValue();
+        propertiesFilePrefix = argPropertyPrefix.getValue();
 
         //Basic validation
         if (language == unknown)
@@ -2065,6 +2070,8 @@
             }
         }
 
+        printf("INFO: Properties file prefix: %s\n", propertiesFilePrefix.c_str());
+
         if (translateMode)
         {
             if (!outDir.empty())



More information about the mapguide-commits mailing list