[mapguide-commits] r6551 - in trunk/Installer: FdoRegUtil Installers/MapGuide Installers/MapGuide/Lang Libraries/MapGuide Server Libraries/MapGuide Web Extensions

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Mar 17 10:39:44 EDT 2012


Author: jng
Date: 2012-03-17 07:39:44 -0700 (Sat, 17 Mar 2012)
New Revision: 6551

Modified:
   trunk/Installer/FdoRegUtil/FdoRegUtil.cpp
   trunk/Installer/FdoRegUtil/stdafx.h
   trunk/Installer/Installers/MapGuide/Lang/MapGuide_en-US.wxl
   trunk/Installer/Installers/MapGuide/MapGuide.wxs
   trunk/Installer/Libraries/MapGuide Server/FDO.wxs
   trunk/Installer/Libraries/MapGuide Web Extensions/Apache.wxs
Log:
#1970: Restore old FDO provider registration method in installer
#953: Add tomcat service installation to the installer. This is not fully working yet. The service is installed, but does not start up.

Modified: trunk/Installer/FdoRegUtil/FdoRegUtil.cpp
===================================================================
--- trunk/Installer/FdoRegUtil/FdoRegUtil.cpp	2012-03-16 05:52:32 UTC (rev 6550)
+++ trunk/Installer/FdoRegUtil/FdoRegUtil.cpp	2012-03-17 14:39:44 UTC (rev 6551)
@@ -4,12 +4,19 @@
 #include "stdafx.h"
 
 // usage: FdoRegUtil.exe [-r] <provider dll>
+//        FdoRegUtil.exe [-r] <provider name> <display name> <provider description> <version> <fdo version> <provider dll path>
 //        FdoRegUtil.exe [-u] <provider name>
 
 int _tmain(int argc, _TCHAR* argv[])
 {
 	int ret = 0;
-	if (argc == 3)
+    if (argc == 8)
+    {
+        if (wcscmp(argv[1], L"-r") != 0)
+            Usage();
+        ret = Register(argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
+    }
+	else if (argc == 3)
 	{
 		if(wcscmp(argv[1], L"-u") == 0)
 			ret = Unregister(argv[2]);
@@ -24,7 +31,8 @@
 void Usage()
 {
 	printf("usage\n");
-	printf("registering: FdoRegUtil.exe -r <provider dll path>\n");
+	printf("registering (method 1): FdoRegUtil.exe -r <provider dll path>\n");
+    printf("registering (method 2): FdoRegUtil.exe -r <provider name> <display name> <provider description> <version> <fdo version> <provider dll path>\n");
 	printf("unregistering: FdoRegUtil.exe -u <provider name>\n");
 }
 
@@ -56,6 +64,22 @@
 	return ret;
 }
 
+int Register(_TCHAR* name, _TCHAR* displayName, _TCHAR* description, _TCHAR* version, _TCHAR* fdoVersion, _TCHAR* path)
+{
+    int ret = 0;
+    FdoPtr<IProviderRegistry> prvReg = FdoFeatureAccessManager::GetProviderRegistry();
+    try 
+    {
+        prvReg->RegisterProvider(name, displayName, description, version, fdoVersion, path, false);
+    }
+    catch(FdoException* ex)
+    {
+        ex->Release();
+        ret = -1;
+    }
+    return ret;
+}
+
 int Unregister(_TCHAR* name)
 {
 	int ret = 0;

Modified: trunk/Installer/FdoRegUtil/stdafx.h
===================================================================
--- trunk/Installer/FdoRegUtil/stdafx.h	2012-03-16 05:52:32 UTC (rev 6550)
+++ trunk/Installer/FdoRegUtil/stdafx.h	2012-03-17 14:39:44 UTC (rev 6551)
@@ -11,6 +11,7 @@
 #include <tchar.h>
 
 int Register(_TCHAR* path);
+int Register(_TCHAR* name, _TCHAR* displayName, _TCHAR* description, _TCHAR* version, _TCHAR* fdoVersion, _TCHAR* path);
 int Unregister(_TCHAR* name);
 void Usage();
 

Modified: trunk/Installer/Installers/MapGuide/Lang/MapGuide_en-US.wxl
===================================================================
--- trunk/Installer/Installers/MapGuide/Lang/MapGuide_en-US.wxl	2012-03-16 05:52:32 UTC (rev 6550)
+++ trunk/Installer/Installers/MapGuide/Lang/MapGuide_en-US.wxl	2012-03-17 14:39:44 UTC (rev 6551)
@@ -75,8 +75,9 @@
     <String Id="UpdateApacheConfig">Setting values for httpd.conf</String>
     <String Id="UpdatePhpIni">Setting values for php.ini</String>
     <String Id="InstallApacheServiceCA">Installing Apache Service</String>
+    <String Id="InstallTomcatServiceCA">Installing Tomcat Service</String>
     <String Id="MgServerInstallCA">Installing MapGuide Service</String>
     <String Id="MgServerUninstallCA">Removing MapGuide Service</String>
     <String Id="RemoveApacheServiceCA">Removing Apache Service</String>
-
+    <String Id="RemoveTomcatServiceCA">Removing Tomcat Service</String>
 </WixLocalization>
\ No newline at end of file

Modified: trunk/Installer/Installers/MapGuide/MapGuide.wxs
===================================================================
--- trunk/Installer/Installers/MapGuide/MapGuide.wxs	2012-03-16 05:52:32 UTC (rev 6550)
+++ trunk/Installer/Installers/MapGuide/MapGuide.wxs	2012-03-17 14:39:44 UTC (rev 6551)
@@ -644,9 +644,11 @@
             <ProgressText Action="UpdateApacheConfig">!(loc.UpdateApacheConfig)</ProgressText>
             <ProgressText Action="UpdatePhpIni">!(loc.UpdatePhpIni)</ProgressText>
             <ProgressText Action="InstallApacheServiceCA">!(loc.InstallApacheServiceCA)</ProgressText>
+            <ProgressText Action="InstallTomcatServiceCA">!(loc.InstallTomcatServiceCA)</ProgressText>
             <ProgressText Action="MgServerInstallCA">!(loc.MgServerInstallCA)</ProgressText>
             <ProgressText Action="MgServerUninstallCA">!(loc.MgServerUninstallCA)</ProgressText>
             <ProgressText Action="RemoveApacheServiceCA">!(loc.RemoveApacheServiceCA)</ProgressText>
+            <ProgressText Action="RemoveTomcatServiceCA">!(loc.RemoveTomcatServiceCA)</ProgressText>
 
         </UI>
 
@@ -840,6 +842,12 @@
                 Action="StartApacheServiceCA"
                 After="InstallApacheServiceCA">MGWEB_CONFIG=&quot;APACHE&quot; AND &amp;WebExtApacheFeature&gt;2</Custom>
             <Custom
+                Action="InstallTomcatServiceCA"
+                Before="InstallFinalize">MGWEB_CONFIG=&quot;APACHE&quot; AND &amp;WebExtTomcatFeature&gt;2</Custom>
+            <Custom
+                Action="StartTomcatServiceCA"
+                Before="InstallTomcatServiceCA">MGWEB_CONFIG=&quot;APACHE&quot; AND &amp;WebExtTomcatFeature&gt;2</Custom>
+            <Custom
                 Action="MgServerInstallCA"
                 Before="InstallFinalize">&amp;ServerFeature&gt;2</Custom>
             <Custom
@@ -848,6 +856,9 @@
             <Custom
                 Action="RemoveApacheServiceCA"
                 Before="RemoveFiles">MGWEB_CONFIG=&quot;APACHE&quot; AND &amp;WebExtApacheFeature=2</Custom>
+            <Custom
+                Action="RemoveTomcatServiceCA"
+                Before="RemoveFiles">MGWEB_CONFIG=&quot;APACHE&quot; AND &amp;WebExtTomcatFeature&gt;2</Custom>
         </InstallExecuteSequence>
     </Product>
 </Wix>

Modified: trunk/Installer/Libraries/MapGuide Server/FDO.wxs
===================================================================
--- trunk/Installer/Libraries/MapGuide Server/FDO.wxs	2012-03-16 05:52:32 UTC (rev 6550)
+++ trunk/Installer/Libraries/MapGuide Server/FDO.wxs	2012-03-17 14:39:44 UTC (rev 6551)
@@ -15,19 +15,19 @@
   <Fragment>
       <CustomAction Id="FdoRegCmd" Property="FdoReg" Execute="immediate" Value="&quot;[FDOLOCATION]FdoRegUtil.exe&quot;" />
 
-      <CustomAction Execute="immediate" Id="FdoRegArcSdeCmd" Property="FdoRegArcSde" Value="[FdoReg] -r &quot;.\ArcSDEProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegSdfCmd" Property="FdoRegSdf" Value="[FdoReg] -r &quot;.\SDFProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegShpCmd" Property="FdoRegShp" Value="[FdoReg] -r &quot;.\SHPProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegWfsCmd" Property="FdoRegWfs" Value="[FdoReg] -r &quot;.\WFSProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegWmsCmd" Property="FdoRegWms" Value="[FdoReg] -r &quot;.\WMSProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegOdbcCmd" Property="FdoRegOdbc" Value="[FdoReg] -r &quot;.\ODBCProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegMySqlCmd" Property="FdoRegMySql" Value="[FdoReg] -r &quot;.\MySQLProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegGdalCmd" Property="FdoRegGdal" Value="[FdoReg] -r &quot;.\GRFPProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegOgrCmd" Property="FdoRegOgr" Value="[FdoReg] -r &quot;.\OGRProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegPostgreSqlCmd" Property="FdoRegPostgreSql" Value="[FdoReg] -r &quot;.\PostgreSQLProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegOracleCmd" Property="FdoRegOracle" Value="[FdoReg] -r &quot;.\KingOracleProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegSqlServerCmd" Property="FdoRegSqlServer" Value="[FdoReg] -r &quot;.\SQLServerSpatialProvider.dll&quot;" />
-      <CustomAction Execute="immediate" Id="FdoRegSltCmd" Property="FdoRegSlt" Value="[FdoReg] -r &quot;.\SQLiteProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegArcSdeCmd" Property="FdoRegArcSde" Value="[FdoReg] -r &quot;OSGeo.ArcSDE.[FDO_VERSION_SMALL]&quot; &quot;!(loc.ArcSdeProvider)&quot; &quot;!(loc.ArcSdeProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\ArcSDEProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegSdfCmd" Property="FdoRegSdf" Value="[FdoReg] -r &quot;OSGeo.SDF.[FDO_VERSION_SMALL]&quot; &quot;!(loc.SdfProvider)&quot; &quot;!(loc.SdfProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\SDFProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegShpCmd" Property="FdoRegShp" Value="[FdoReg] -r &quot;OSGeo.SHP.[FDO_VERSION_SMALL]&quot; &quot;!(loc.ShpProvider)&quot; &quot;!(loc.ShpProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\SHPProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegWfsCmd" Property="FdoRegWfs" Value="[FdoReg] -r &quot;OSGeo.WFS.[FDO_VERSION_SMALL]&quot; &quot;!(loc.WfsProvider)&quot; &quot;!(loc.WfsProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\WFSProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegWmsCmd" Property="FdoRegWms" Value="[FdoReg] -r &quot;OSGeo.WMS.[FDO_VERSION_SMALL]&quot; &quot;!(loc.WmsProvider)&quot; &quot;!(loc.WmsProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\WMSProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegOdbcCmd" Property="FdoRegOdbc" Value="[FdoReg] -r &quot;OSGeo.ODBC.[FDO_VERSION_SMALL]&quot; &quot;!(loc.OdbcProvider)&quot; &quot;!(loc.OdbcProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\ODBCProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegMySqlCmd" Property="FdoRegMySql" Value="[FdoReg] -r &quot;OSGeo.MySQL.[FDO_VERSION_SMALL]&quot; &quot;!(loc.MySqlProvider)&quot; &quot;!(loc.MySqlProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\MySQLProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegGdalCmd" Property="FdoRegGdal" Value="[FdoReg] -r &quot;OSGeo.Gdal.[FDO_VERSION_SMALL]&quot; &quot;!(loc.GdalProvider)&quot; &quot;!(loc.GdalProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\GRFPProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegOgrCmd" Property="FdoRegOgr" Value="[FdoReg] -r &quot;OSGeo.OGR.[FDO_VERSION_SMALL]&quot; &quot;!(loc.OgrProvider)&quot; &quot;!(loc.OgrProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\OGRProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegPostgreSqlCmd" Property="FdoRegPostgreSql" Value="[FdoReg] -r &quot;OSGeo.PostgreSQL.[FDO_VERSION_SMALL]&quot; &quot;!(loc.PostgreSqlProvider)&quot; &quot;!(loc.PostgreSqlProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\PostgreSQLProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegOracleCmd" Property="FdoRegOracle" Value="[FdoReg] -r &quot;King.Oracle.[FDO_VERSION_SMALL]&quot; &quot;!(loc.KingOracleProvider)&quot; &quot;!(loc.KingOracleProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\KingOracleProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegSqlServerCmd" Property="FdoRegSqlServer" Value="[FdoReg] -r &quot;OSGeo.SQLServerSpatial.[FDO_VERSION_SMALL]&quot; &quot;!(loc.SqlServerProvider)&quot; &quot;!(loc.SqlServerProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\SQLServerSpatialProvider.dll&quot;" />
+      <CustomAction Execute="immediate" Id="FdoRegSltCmd" Property="FdoRegSlt" Value="[FdoReg] -r &quot;OSGeo.SQLite.[FDO_VERSION_SMALL]&quot; &quot;!(loc.SltProvider)&quot; &quot;!(loc.SltProviderDesc)&quot; &quot;[FDO_VERSION]&quot; &quot;[FDO_VERSION]&quot; &quot;.\SQLiteProvider.dll&quot;" />
 
       <CustomAction Id="FdoRegArcSde" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>
       <CustomAction Id="FdoRegSdf" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>

Modified: trunk/Installer/Libraries/MapGuide Web Extensions/Apache.wxs
===================================================================
--- trunk/Installer/Libraries/MapGuide Web Extensions/Apache.wxs	2012-03-16 05:52:32 UTC (rev 6550)
+++ trunk/Installer/Libraries/MapGuide Web Extensions/Apache.wxs	2012-03-17 14:39:44 UTC (rev 6551)
@@ -1,8 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
-    <!-- httpd.exe -->
-    <?define HTTP_MAP = "file_APACHEFILES_19" ?>
-	<Fragment>
+    <?if "$(var.MgPlatform)" = "x64" ?>
+        <!-- httpd.exe -->
+        <?define HTTP_MAP = "file_APACHEFILES_19" ?>
+        <!-- tomcat7.exe -->
+        <?define TOMCAT_MAP = "file_TOMCATFILES_39" ?>
+        <!-- service.bat -->
+        <?define TOMCAT_BAT = "file_TOMCATFILES_29" ?>
+    <?else ?>
+        <!-- httpd.exe -->
+        <?define HTTP_MAP = "file_APACHEFILES_19" ?>
+        <!-- tomcat7.exe -->
+        <?define TOMCAT_MAP = "file_TOMCATFILES_39" ?>
+        <!-- service.bat -->
+        <?define TOMCAT_BAT = "file_TOMCATFILES_29" ?>
+    <?endif ?>
+    <Fragment>
         <Binary Id="ApacheActions" SourceFile="..\..\Custom\bin\apache_actions.dll" />
         <CustomAction Id="UpdateApacheConfig.SetValues" Property="UpdateApacheConfig" Value="[WEBEXTENSIONSLOCATION];[APACHE_API_TYPE];[APACHE_PORT];[APACHELOCATION];[PHPLOCATION];[WEBROOTLOCATION];[VIRTUALDIR]" />
         <CustomAction Id="UpdateApacheConfig" Return="check" BinaryKey="ApacheActions" Execute="deferred"  DllEntry="UpdateApacheConfig" />
@@ -11,5 +24,8 @@
         <CustomAction Id="RemoveApacheServiceCA" Execute="immediate" Return="ignore" FileKey="$(var.HTTP_MAP)" ExeCommand="-k uninstall -n &quot;ApacheMapGuide[MG_VERSION_MAJOR_MINOR]&quot;" />
         <CustomAction Id="InstallApacheServiceCA" Execute="deferred" Return="ignore" FileKey="$(var.HTTP_MAP)" ExeCommand="-k install -n &quot;ApacheMapGuide[MG_VERSION_MAJOR_MINOR]&quot;" />
         <CustomAction Id="StartApacheServiceCA" Execute="deferred" Return="ignore" FileKey="$(var.HTTP_MAP)" ExeCommand="-k start -n &quot;ApacheMapGuide[MG_VERSION_MAJOR_MINOR]&quot;" />
+        <CustomAction Id="RemoveTomcatServiceCA" Execute="immediate" Return="ignore" FileKey="$(var.TOMCAT_MAP)" ExeCommand="//DS//TomcatMapGuide[MG_VERSION_MAJOR_MINOR]" />
+        <CustomAction Id="InstallTomcatServiceCA" Execute="deferred" Return="ignore" FileKey="$(var.TOMCAT_BAT)" ExeCommand="install TomcatMapGuide[MG_VERSION_MAJOR_MINOR]" />
+        <CustomAction Id="StartTomcatServiceCA" Execute="deferred" Return="ignore" FileKey="$(var.TOMCAT_MAP)" ExeCommand="//RS//TomcatMapGuide[MG_VERSION_MAJOR_MINOR]" />
 	</Fragment>
 </Wix>
\ No newline at end of file



More information about the mapguide-commits mailing list