[mapguide-commits] r6542 - trunk/Installer/Custom/apache_actions

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Mar 9 11:38:45 EST 2012


Author: jng
Date: 2012-03-09 08:38:45 -0800 (Fri, 09 Mar 2012)
New Revision: 6542

Modified:
   trunk/Installer/Custom/apache_actions/StdAfx.h
   trunk/Installer/Custom/apache_actions/apache_actions.cpp
Log:
#1805: Fix broken Java configuration. The custom action was mis-configuring a tomcat config file

Modified: trunk/Installer/Custom/apache_actions/StdAfx.h
===================================================================
--- trunk/Installer/Custom/apache_actions/StdAfx.h	2012-03-09 13:26:34 UTC (rev 6541)
+++ trunk/Installer/Custom/apache_actions/StdAfx.h	2012-03-09 16:38:45 UTC (rev 6542)
@@ -22,6 +22,14 @@
 
 // TODO: reference additional headers your program requires here
 
+//#define MSGBOX_DEBUGGING
+
+#ifdef MSGBOX_DEBUGGING
+#define MSGBOX_DEBUG_MSG(msg) ::MessageBoxW(NULL, L##msg, L"Debugging apache_actions", MB_OK)
+#else
+#define MSGBOX_DEBUG_MSG(msg)
+#endif
+
 //{{AFX_INSERT_LOCATION}}
 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
 

Modified: trunk/Installer/Custom/apache_actions/apache_actions.cpp
===================================================================
--- trunk/Installer/Custom/apache_actions/apache_actions.cpp	2012-03-09 13:26:34 UTC (rev 6541)
+++ trunk/Installer/Custom/apache_actions/apache_actions.cpp	2012-03-09 16:38:45 UTC (rev 6542)
@@ -303,6 +303,7 @@
 
 		if (FileExists(szHttpdConf))
 		{
+            MSGBOX_DEBUG_MSG("Processing httpd.conf");
 			std::ifstream fin(szHttpdConf);
 			
 			std::string buffer;
@@ -338,7 +339,12 @@
 			std::ofstream fout(szHttpdConf);
 			fout << buffer;
 			fout.close();
+            MSGBOX_DEBUG_MSG("httpd.conf configured");
 		}
+        else
+        {
+            MSGBOX_DEBUG_MSG("httpd.conf not found");
+        }
 
         //Even if the java option is not the active API, perform these substitutions
         //anyway on these files should they get installed.
@@ -348,6 +354,7 @@
 
 		if (FileExists(szTomcatConf))
 		{
+            MSGBOX_DEBUG_MSG("Processing tomcat.conf");
 			std::ifstream fin(szTomcatConf);
 			
 			std::string buffer;
@@ -367,14 +374,21 @@
 			std::ofstream fout(szTomcatConf);
 			fout << buffer;
 			fout.close();
+
+            MSGBOX_DEBUG_MSG("tomcat.conf processed");
 		}
+        else
+        {
+            MSGBOX_DEBUG_MSG("ERROR: tomcat.conf not found");
+        }
         
         szFileName = szWebExtDir + "\\Tomcat\\conf\\Catalina\\localhost\\mapguide.xml";
         const char* szMapGuideXml = szFileName.c_str();
         
         if (FileExists(szMapGuideXml))
         {
-            std::ifstream fin(szTomcatConf);
+            MSGBOX_DEBUG_MSG("Processing Tomcat\\conf\\Catalina\\localhost\\mapguide.xml");
+            std::ifstream fin(szMapGuideXml);
 			
 			std::string buffer;
 			std::string line;
@@ -392,8 +406,17 @@
 			std::ofstream fout(szMapGuideXml);
 			fout << buffer;
 			fout.close();
+            MSGBOX_DEBUG_MSG("Tomcat\\conf\\Catalina\\localhost\\mapguide.xml processed");
         }
+        else
+        {
+            MSGBOX_DEBUG_MSG("ERROR: Tomcat\\conf\\Catalina\\localhost\\mapguide.xml not found");
+        }
 	}
+    else
+    {
+        MSGBOX_DEBUG_MSG("ERROR: Unexpected number of tokens in CustomActionData");
+    }
 	return ERROR_SUCCESS;
 }
 



More information about the mapguide-commits mailing list