[mapguide-commits] r6192 - in trunk/Tools/MgInstantSetup: InstantSetup InstantSetup.Core InstantSetup.Core/Properties InstantSetup.Core/Resources

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Oct 28 09:15:23 EDT 2011


Author: jng
Date: 2011-10-28 06:15:23 -0700 (Fri, 28 Oct 2011)
New Revision: 6192

Added:
   trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/APACHE_WEB1.txt
   trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER1.txt
   trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_INSTALL1.txt
   trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_UNINSTALL1.txt
Modified:
   trunk/Tools/MgInstantSetup/InstantSetup.Core/AbstractSetupConfigurationProcess.cs
   trunk/Tools/MgInstantSetup/InstantSetup.Core/ApacheSetupConfigurationProcess.cs
   trunk/Tools/MgInstantSetup/InstantSetup.Core/InstantSetup.Core.csproj
   trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.Designer.cs
   trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.resx
   trunk/Tools/MgInstantSetup/InstantSetup/Form1.Designer.cs
   trunk/Tools/MgInstantSetup/InstantSetup/Form1.cs
Log:
#1840: Update MgInstantSetup utility to support RFC122

Modified: trunk/Tools/MgInstantSetup/InstantSetup/Form1.Designer.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/Form1.Designer.cs	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup/Form1.Designer.cs	2011-10-28 13:15:23 UTC (rev 6192)
@@ -41,6 +41,7 @@
             this.button1 = new System.Windows.Forms.Button();
             this.txtBatchOutput = new System.Windows.Forms.TextBox();
             this.label3 = new System.Windows.Forms.Label();
+            this.chkWriteMentorDictPath = new System.Windows.Forms.CheckBox();
             this.tabControl1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -169,11 +170,23 @@
             this.label3.TabIndex = 8;
             this.label3.Text = "Batch File Output Directory";
             // 
+            // chkWriteMentorDictPath
+            // 
+            this.chkWriteMentorDictPath.AutoSize = true;
+            this.chkWriteMentorDictPath.Location = new System.Drawing.Point(116, 513);
+            this.chkWriteMentorDictPath.Name = "chkWriteMentorDictPath";
+            this.chkWriteMentorDictPath.Size = new System.Drawing.Size(271, 17);
+            this.chkWriteMentorDictPath.TabIndex = 11;
+            this.chkWriteMentorDictPath.Text = "Write MENTOR_DICTIONARY_PATH to batch files";
+            this.chkWriteMentorDictPath.UseVisualStyleBackColor = true;
+            this.chkWriteMentorDictPath.CheckedChanged += new System.EventHandler(this.chkWriteMentorDictPath_CheckedChanged);
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(552, 544);
+            this.Controls.Add(this.chkWriteMentorDictPath);
             this.Controls.Add(this.button1);
             this.Controls.Add(this.txtBatchOutput);
             this.Controls.Add(this.label3);
@@ -208,6 +221,7 @@
         private System.Windows.Forms.Button button1;
         private System.Windows.Forms.TextBox txtBatchOutput;
         private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.CheckBox chkWriteMentorDictPath;
     }
 }
 

Modified: trunk/Tools/MgInstantSetup/InstantSetup/Form1.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/Form1.cs	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup/Form1.cs	2011-10-28 13:15:23 UTC (rev 6192)
@@ -72,6 +72,11 @@
             _apacheConf.Config.InstallServices = chkInstallServices.Checked;
         }
 
+        private void chkWriteMentorDictPath_CheckedChanged(object sender, EventArgs e)
+        {
+            _apacheConf.Config.WriteMentorDictionaryPath = chkWriteMentorDictPath.Checked;
+        }
+
         private void btnConfigure_Click(object sender, EventArgs e)
         {
             try

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/AbstractSetupConfigurationProcess.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/AbstractSetupConfigurationProcess.cs	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/AbstractSetupConfigurationProcess.cs	2011-10-28 13:15:23 UTC (rev 6192)
@@ -39,6 +39,7 @@
         protected AbstractSetupConfigurationProcess()
         {
             this.EnablePhp = true;
+            this.WriteMentorDictionaryPath = false;
             this.DefaultViewer = ApiType.Php;
 
             //Port numbers specified not to intentionally clash with an existing 
@@ -48,6 +49,8 @@
             this.ServerSitePort = 2822;
         }
 
+        public bool WriteMentorDictionaryPath { get; set; }
+
         public string BatchFileOutputDirectory { get; set; }
 
         public string MapGuideServiceName { get; set; }
@@ -207,18 +210,34 @@
             }
             else
             {
-                //Write server batch file
-                string serverText = string.Format(Properties.Resources.SERVER, this.CsMapDictionaryDir, this.ServerBinDir);
-                File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserver.bat"), serverText);
+                if (this.WriteMentorDictionaryPath)
+                {
+                    //Write server batch file
+                    string serverText = string.Format(Properties.Resources.SERVER, this.CsMapDictionaryDir, this.ServerBinDir);
+                    File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserver.bat"), serverText);
 
-                //Write service install batch file
-                serverText = string.Format(Properties.Resources.SERVER_INSTALL, this.CsMapDictionaryDir, this.ServerBinDir, this.MapGuideServiceName);
-                File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserverinstall.bat"), serverText);
+                    //Write service install batch file
+                    serverText = string.Format(Properties.Resources.SERVER_INSTALL, this.CsMapDictionaryDir, this.ServerBinDir, this.MapGuideServiceName);
+                    File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserverinstall.bat"), serverText);
 
-                //Write service uninstall batch file
-                serverText = string.Format(Properties.Resources.SERVER_UNINSTALL, this.CsMapDictionaryDir, this.ServerBinDir, this.MapGuideServiceName);
-                File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserveruninstall.bat"), serverText);
+                    //Write service uninstall batch file
+                    serverText = string.Format(Properties.Resources.SERVER_UNINSTALL, this.CsMapDictionaryDir, this.ServerBinDir, this.MapGuideServiceName);
+                    File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserveruninstall.bat"), serverText);
+                }
+                else //Post RFC 122
+                {
+                    //Write server batch file
+                    string serverText = string.Format(Properties.Resources.SERVER_NO_MENTOR, this.ServerBinDir);
+                    File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserver.bat"), serverText);
 
+                    //Write service install batch file
+                    serverText = string.Format(Properties.Resources.SERVER_INSTALL_NO_MENTOR, this.ServerBinDir, this.MapGuideServiceName);
+                    File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserverinstall.bat"), serverText);
+
+                    //Write service uninstall batch file
+                    serverText = string.Format(Properties.Resources.SERVER_UNINSTALL_NO_MENTOR, this.ServerBinDir, this.MapGuideServiceName);
+                    File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgserveruninstall.bat"), serverText);
+                }
                 WriteAdditionalBatchFiles();
             }
         }
@@ -245,6 +264,10 @@
             _webConfig.IniWriteValue("GeneralProperties","ResourcesPath",Path.Combine(this.WebTierMapAgentDir, "Resources"));
             _webConfig.IniWriteValue("GeneralProperties","TempPath",Path.Combine(this.WebTierRootDir, "Temp"));
 
+            //Post RFC 122
+            if (!this.WriteMentorDictionaryPath)
+                _webConfig.IniWriteValue("GeneralProperties", "MentorDictionaryPath", this.CsMapDictionaryDir);
+
             _webConfig.IniWriteValue("SiteConnectionProperties","IpAddress","127.0.0.1");
 
             _webConfig.IniWriteValue("WebApplicationProperties","TemplateRootFolder",Path.Combine(this.WebTierPublicDir, "fusion\\templates\\mapguide"));
@@ -266,6 +289,10 @@
             _serverConfig.IniWriteValue("GeneralProperties","WfsDocumentPath",Path.Combine(ServerRootDir, "Wfs"));
             _serverConfig.IniWriteValue("GeneralProperties","WmsDocumentPath",Path.Combine(ServerRootDir, "Wms"));
             _serverConfig.IniWriteValue("GeneralProperties","FdoPath",Path.Combine(ServerRootDir, "Fdo"));
+
+            //Post RFC 122
+            if (!this.WriteMentorDictionaryPath)
+                _serverConfig.IniWriteValue("GeneralProperties", "MentorDictionaryPath", this.CsMapDictionaryDir);
             
             _serverConfig.IniWriteValue("ResourceServiceProperties","PackagesPath",Path.Combine(ServerRootDir, "Packages"));
 

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/ApacheSetupConfigurationProcess.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/ApacheSetupConfigurationProcess.cs	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/ApacheSetupConfigurationProcess.cs	2011-10-28 13:15:23 UTC (rev 6192)
@@ -139,9 +139,19 @@
 
         protected override void WriteAdditionalBatchFiles()
         {
-            //Write httpd batch file
-            string httpdText = string.Format(Properties.Resources.APACHE_WEB, this.CsMapDictionaryDir, Path.Combine(this.WebTierApacheDir, "bin"));
-            File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgwebtier.bat"), httpdText);
+            string httpdText = "";
+            if (this.WriteMentorDictionaryPath)
+            {
+                //Write httpd batch file
+                httpdText = string.Format(Properties.Resources.APACHE_WEB, this.CsMapDictionaryDir, Path.Combine(this.WebTierApacheDir, "bin"));
+                File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgwebtier.bat"), httpdText);
+            }
+            else //Post RFC 122
+            {
+                //Write httpd batch file
+                httpdText = string.Format(Properties.Resources.APACHE_WEB_NO_MENTOR, Path.Combine(this.WebTierApacheDir, "bin"));
+                File.WriteAllText(Path.Combine(this.BatchFileOutputDirectory, "mgwebtier.bat"), httpdText);
+            }
 
             //Write service installer batch file
             httpdText = string.Format(Properties.Resources.APACHE_WEB_INSTALL, Path.Combine(this.WebTierApacheDir, "bin"), this.HttpdServiceName);

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/InstantSetup.Core.csproj
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/InstantSetup.Core.csproj	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/InstantSetup.Core.csproj	2011-10-28 13:15:23 UTC (rev 6192)
@@ -74,6 +74,18 @@
   <ItemGroup>
     <None Include="Resources\APACHE_WEB_UNINSTALL.txt" />
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\APACHE_WEB1.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\SERVER1.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\SERVER_INSTALL1.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\SERVER_UNINSTALL1.txt" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.Designer.cs	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.Designer.cs	2011-10-28 13:15:23 UTC (rev 6192)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.4961
+//     Runtime Version:2.0.50727.5420
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -74,7 +74,7 @@
         
         /// <summary>
         ///   Looks up a localized string similar to pushd {0}
-        ///httpd.exe -k install &quot;{1}&quot;
+        ///httpd.exe -k install -n &quot;{1}&quot;
         ///popd.
         /// </summary>
         internal static string APACHE_WEB_INSTALL {
@@ -85,9 +85,20 @@
         
         /// <summary>
         ///   Looks up a localized string similar to pushd {0}
-        ///httpd.exe -k uninstall &quot;{1}&quot;
+        ///httpd.exe
         ///popd.
         /// </summary>
+        internal static string APACHE_WEB_NO_MENTOR {
+            get {
+                return ResourceManager.GetString("APACHE_WEB_NO_MENTOR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to pushd {0}
+        ///httpd.exe -k uninstall -n &quot;{1}&quot;
+        ///popd.
+        /// </summary>
         internal static string APACHE_WEB_UNINSTALL {
             get {
                 return ResourceManager.GetString("APACHE_WEB_UNINSTALL", resourceCulture);
@@ -119,6 +130,28 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to pushd {0}
+        ///mgserver install &quot;{1}&quot;
+        ///popd.
+        /// </summary>
+        internal static string SERVER_INSTALL_NO_MENTOR {
+            get {
+                return ResourceManager.GetString("SERVER_INSTALL_NO_MENTOR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to pushd {0}
+        ///mgserver.exe run
+        ///popd.
+        /// </summary>
+        internal static string SERVER_NO_MENTOR {
+            get {
+                return ResourceManager.GetString("SERVER_NO_MENTOR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to SET MENTOR_DICTIONARY_PATH={0}
         ///pushd {1}
         ///mgserver uninstall &quot;{2}&quot;
@@ -129,5 +162,16 @@
                 return ResourceManager.GetString("SERVER_UNINSTALL", resourceCulture);
             }
         }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to pushd {0}
+        ///mgserver uninstall &quot;{1}&quot;
+        ///popd.
+        /// </summary>
+        internal static string SERVER_UNINSTALL_NO_MENTOR {
+            get {
+                return ResourceManager.GetString("SERVER_UNINSTALL_NO_MENTOR", resourceCulture);
+            }
+        }
     }
 }

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.resx
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.resx	2011-10-28 11:38:49 UTC (rev 6191)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/Properties/Resources.resx	2011-10-28 13:15:23 UTC (rev 6192)
@@ -119,21 +119,33 @@
   </resheader>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="APACHE_WEB" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\APACHE_WEB.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+    <value>..\Resources\APACHE_WEB.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
   </data>
   <data name="APACHE_WEB_INSTALL" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\APACHE_WEB_INSTALL.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
   </data>
+  <data name="APACHE_WEB_NO_MENTOR" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\APACHE_WEB1.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
   <data name="APACHE_WEB_UNINSTALL" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\APACHE_WEB_UNINSTALL.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
   </data>
   <data name="SERVER" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\SERVER.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+    <value>..\Resources\SERVER.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
   </data>
   <data name="SERVER_INSTALL" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\SERVER_INSTALL.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+    <value>..\Resources\SERVER_INSTALL.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
   </data>
+  <data name="SERVER_INSTALL_NO_MENTOR" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\SERVER_INSTALL1.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="SERVER_NO_MENTOR" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\SERVER1.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
   <data name="SERVER_UNINSTALL" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\SERVER_UNINSTALL.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+    <value>..\Resources\SERVER_UNINSTALL.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
   </data>
+  <data name="SERVER_UNINSTALL_NO_MENTOR" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\SERVER_UNINSTALL1.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
 </root>
\ No newline at end of file

Added: trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/APACHE_WEB1.txt
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/APACHE_WEB1.txt	                        (rev 0)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/APACHE_WEB1.txt	2011-10-28 13:15:23 UTC (rev 6192)
@@ -0,0 +1,3 @@
+pushd {0}
+httpd.exe
+popd
\ No newline at end of file

Added: trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER1.txt
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER1.txt	                        (rev 0)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER1.txt	2011-10-28 13:15:23 UTC (rev 6192)
@@ -0,0 +1,3 @@
+pushd {0}
+mgserver.exe run
+popd
\ No newline at end of file

Added: trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_INSTALL1.txt
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_INSTALL1.txt	                        (rev 0)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_INSTALL1.txt	2011-10-28 13:15:23 UTC (rev 6192)
@@ -0,0 +1,3 @@
+pushd {0}
+mgserver install "{1}"
+popd
\ No newline at end of file

Added: trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_UNINSTALL1.txt
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_UNINSTALL1.txt	                        (rev 0)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/Resources/SERVER_UNINSTALL1.txt	2011-10-28 13:15:23 UTC (rev 6192)
@@ -0,0 +1,3 @@
+pushd {0}
+mgserver uninstall "{1}"
+popd
\ No newline at end of file



More information about the mapguide-commits mailing list