stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r673604 - /stdcxx/branches/4.2.x/util/gencat.cpp
Date Thu, 03 Jul 2008 08:00:21 GMT
Author: faridz
Date: Thu Jul  3 01:00:21 2008
New Revision: 673604

URL: http://svn.apache.org/viewvc?rev=673604&view=rev
Log:
2008-07-03  Farid Zaripov  <faridz@apache.com>

	* util/gencat.cpp (main): Added code for generating
	message catalogs on MinGW.

Modified:
    stdcxx/branches/4.2.x/util/gencat.cpp

Modified: stdcxx/branches/4.2.x/util/gencat.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/util/gencat.cpp?rev=673604&r1=673603&r2=673604&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/util/gencat.cpp (original)
+++ stdcxx/branches/4.2.x/util/gencat.cpp Thu Jul  3 01:00:21 2008
@@ -114,11 +114,7 @@
 
 #ifdef _WIN32
 
-#  ifndef _WIN64
-#    define PLATFORM "X86"
-#  else   // _WIN64
-#    define PLATFORM "X64"
-#  endif  // _WIN64
+#  ifndef __MINGW32__
 
     const char* const env_vars [] = {
         "VS90COMNTOOLS", "VS80COMNTOOLS",
@@ -138,14 +134,35 @@
         cmd.push_back ('\"');
     }
 
+    if (!cmd.empty ())
+        cmd += " && ";
+
+#  endif   // !__MINGW32__
+
     const char* const dll_name = argv [0];
     const char* const rc_name = argv [1];
 
     std::string res_name (rc_name);
     change_ext (res_name, ".res");
 
-    if (!cmd.empty ())
-        cmd += " && ";
+#  ifdef __MINGW32__
+
+    cmd += "windres -O coff -i ";
+    cmd += rc_name;
+    cmd += " -o ";
+    cmd += res_name;
+    cmd += " && gcc -shared -o ";
+    cmd += dll_name;
+    cmd += ' ';
+    cmd += res_name;
+
+#  else
+
+#    ifndef _WIN64
+#      define PLATFORM "X86"
+#    else   // _WIN64
+#      define PLATFORM "X64"
+#    endif  // _WIN64
 
     cmd += "rc ";
     cmd += rc_name;
@@ -154,6 +171,8 @@
     cmd += ' ';
     cmd += res_name;
     
+#  endif   // __MINGW32__
+
     const int ret = std::system (cmd.c_str ());
 
     std::remove (res_name.c_str ());



Mime
View raw message