[mapguide-commits] r9952 - in trunk/Tools/MgInstantSetup: InstantSetup InstantSetup.Core

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Aug 9 07:19:26 PDT 2022


Author: jng
Date: 2022-08-09 07:19:25 -0700 (Tue, 09 Aug 2022)
New Revision: 9952

Modified:
   trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs
   trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs
   trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs
   trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs
   trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.resx
Log:
Add new checkbox to explicitly state whether the IIS application pool to be created needs to support 32-bit applications or not. It is unchecked by default meaning that we assume by default we are doing an instant setup for a 64-bit MapGuide installation.

Fixes #2847

Modified: trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs	2022-07-20 14:55:29 UTC (rev 9951)
+++ trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs	2022-08-09 14:19:25 UTC (rev 9952)
@@ -29,12 +29,14 @@
         private void InitializeComponent()
         {
             this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.txtAppPool = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.txtVirtualDir = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.txtWebSiteName = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.txtAppCmd = new System.Windows.Forms.TextBox();
             this.label1 = new System.Windows.Forms.Label();
-            this.txtAppCmd = new System.Windows.Forms.TextBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.txtWebSiteName = new System.Windows.Forms.TextBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.txtVirtualDir = new System.Windows.Forms.TextBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
             this.numSitePort = new System.Windows.Forms.NumericUpDown();
             this.numClientPort = new System.Windows.Forms.NumericUpDown();
@@ -45,8 +47,7 @@
             this.groupBox4 = new System.Windows.Forms.GroupBox();
             this.rdDotNet = new System.Windows.Forms.RadioButton();
             this.rdPhp = new System.Windows.Forms.RadioButton();
-            this.label7 = new System.Windows.Forms.Label();
-            this.txtAppPool = new System.Windows.Forms.TextBox();
+            this.chkEnable32Bit = new System.Windows.Forms.CheckBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.numSitePort)).BeginInit();
@@ -57,8 +58,9 @@
             // 
             // groupBox1
             // 
-            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Controls.Add(this.chkEnable32Bit);
             this.groupBox1.Controls.Add(this.txtAppPool);
             this.groupBox1.Controls.Add(this.label7);
             this.groupBox1.Controls.Add(this.txtVirtualDir);
@@ -69,43 +71,53 @@
             this.groupBox1.Controls.Add(this.label1);
             this.groupBox1.Location = new System.Drawing.Point(12, 133);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(390, 163);
+            this.groupBox1.Size = new System.Drawing.Size(390, 186);
             this.groupBox1.TabIndex = 0;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "IIS General";
             // 
-            // label1
+            // txtAppPool
             // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(17, 20);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(89, 13);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "appcmd.exe path";
+            this.txtAppPool.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtAppPool.Location = new System.Drawing.Point(144, 122);
+            this.txtAppPool.Name = "txtAppPool";
+            this.txtAppPool.Size = new System.Drawing.Size(222, 20);
+            this.txtAppPool.TabIndex = 7;
+            this.txtAppPool.TextChanged += new System.EventHandler(this.txtAppPool_TextChanged);
             // 
-            // txtAppCmd
+            // label7
             // 
-            this.txtAppCmd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtAppCmd.Location = new System.Drawing.Point(20, 36);
-            this.txtAppCmd.Name = "txtAppCmd";
-            this.txtAppCmd.Size = new System.Drawing.Size(346, 20);
-            this.txtAppCmd.TabIndex = 1;
-            this.txtAppCmd.TextChanged += new System.EventHandler(this.txtAppCmd_TextChanged);
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(17, 125);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(83, 13);
+            this.label7.TabIndex = 6;
+            this.label7.Text = "Application Pool";
             // 
-            // label2
+            // txtVirtualDir
             // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(17, 73);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(82, 13);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "Web Site Name";
+            this.txtVirtualDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtVirtualDir.Location = new System.Drawing.Point(144, 96);
+            this.txtVirtualDir.Name = "txtVirtualDir";
+            this.txtVirtualDir.Size = new System.Drawing.Size(222, 20);
+            this.txtVirtualDir.TabIndex = 5;
+            this.txtVirtualDir.TextChanged += new System.EventHandler(this.txtVirtualDir_TextChanged);
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(17, 99);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(112, 13);
+            this.label3.TabIndex = 4;
+            this.label3.Text = "Virtual Directory Name";
+            // 
             // txtWebSiteName
             // 
-            this.txtWebSiteName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtWebSiteName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.txtWebSiteName.Location = new System.Drawing.Point(144, 70);
             this.txtWebSiteName.Name = "txtWebSiteName";
             this.txtWebSiteName.Size = new System.Drawing.Size(222, 20);
@@ -112,29 +124,38 @@
             this.txtWebSiteName.TabIndex = 3;
             this.txtWebSiteName.TextChanged += new System.EventHandler(this.txtWebSiteName_TextChanged);
             // 
-            // label3
+            // label2
             // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(17, 99);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(112, 13);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "Virtual Directory Name";
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(17, 73);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(82, 13);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "Web Site Name";
             // 
-            // txtVirtualDir
+            // txtAppCmd
             // 
-            this.txtVirtualDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtVirtualDir.Location = new System.Drawing.Point(144, 96);
-            this.txtVirtualDir.Name = "txtVirtualDir";
-            this.txtVirtualDir.Size = new System.Drawing.Size(222, 20);
-            this.txtVirtualDir.TabIndex = 5;
-            this.txtVirtualDir.TextChanged += new System.EventHandler(this.txtVirtualDir_TextChanged);
+            this.txtAppCmd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtAppCmd.Location = new System.Drawing.Point(20, 36);
+            this.txtAppCmd.Name = "txtAppCmd";
+            this.txtAppCmd.Size = new System.Drawing.Size(346, 20);
+            this.txtAppCmd.TabIndex = 1;
+            this.txtAppCmd.TextChanged += new System.EventHandler(this.txtAppCmd_TextChanged);
             // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(17, 20);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(89, 13);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "appcmd.exe path";
+            // 
             // groupBox2
             // 
-            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.groupBox2.Controls.Add(this.numSitePort);
             this.groupBox2.Controls.Add(this.numClientPort);
             this.groupBox2.Controls.Add(this.numAdminPort);
@@ -216,11 +237,11 @@
             // 
             // groupBox4
             // 
-            this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.groupBox4.Controls.Add(this.rdDotNet);
             this.groupBox4.Controls.Add(this.rdPhp);
-            this.groupBox4.Location = new System.Drawing.Point(12, 302);
+            this.groupBox4.Location = new System.Drawing.Point(12, 325);
             this.groupBox4.Name = "groupBox4";
             this.groupBox4.Size = new System.Drawing.Size(390, 50);
             this.groupBox4.TabIndex = 4;
@@ -251,25 +272,17 @@
             this.rdPhp.UseVisualStyleBackColor = true;
             this.rdPhp.CheckedChanged += new System.EventHandler(this.rdPhp_CheckedChanged);
             // 
-            // label7
+            // chkEnable32Bit
             // 
-            this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(17, 125);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(83, 13);
-            this.label7.TabIndex = 6;
-            this.label7.Text = "Application Pool";
+            this.chkEnable32Bit.AutoSize = true;
+            this.chkEnable32Bit.Location = new System.Drawing.Point(19, 153);
+            this.chkEnable32Bit.Name = "chkEnable32Bit";
+            this.chkEnable32Bit.Size = new System.Drawing.Size(354, 17);
+            this.chkEnable32Bit.TabIndex = 8;
+            this.chkEnable32Bit.Text = "Enable 32-bit applications (tick only if configuring for 32-bit MapGuide)";
+            this.chkEnable32Bit.UseVisualStyleBackColor = true;
+            this.chkEnable32Bit.CheckedChanged += new System.EventHandler(this.chkEnable32Bit_CheckedChanged);
             // 
-            // txtAppPool
-            // 
-            this.txtAppPool.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtAppPool.Location = new System.Drawing.Point(144, 122);
-            this.txtAppPool.Name = "txtAppPool";
-            this.txtAppPool.Size = new System.Drawing.Size(222, 20);
-            this.txtAppPool.TabIndex = 7;
-            this.txtAppPool.TextChanged += new System.EventHandler(this.txtAppPool_TextChanged);
-            // 
             // IISConfigCtrl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -278,7 +291,7 @@
             this.Controls.Add(this.groupBox2);
             this.Controls.Add(this.groupBox1);
             this.Name = "IISConfigCtrl";
-            this.Size = new System.Drawing.Size(422, 371);
+            this.Size = new System.Drawing.Size(422, 390);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
             this.groupBox2.ResumeLayout(false);
@@ -313,5 +326,6 @@
         private System.Windows.Forms.RadioButton rdPhp;
         private System.Windows.Forms.TextBox txtAppPool;
         private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.CheckBox chkEnable32Bit;
     }
 }

Modified: trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs	2022-07-20 14:55:29 UTC (rev 9951)
+++ trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs	2022-08-09 14:19:25 UTC (rev 9952)
@@ -47,6 +47,8 @@
 
             rdDotNet.Checked = _confImpl.EnableDotNet;
             rdPhp.Checked = _confImpl.EnablePhp;
+
+            chkEnable32Bit.Checked = _confImpl.Enable32BitAppsOnWin64;
         }
 
         public AbstractSetupConfigurationProcess Config
@@ -106,5 +108,10 @@
         {
             _confImpl.ApplicationPool = txtAppPool.Text;
         }
+
+        private void chkEnable32Bit_CheckedChanged(object sender, EventArgs e)
+        {
+            _confImpl.Enable32BitAppsOnWin64 = chkEnable32Bit.Checked;
+        }
     }
 }

Modified: trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.resx
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.resx	2022-07-20 14:55:29 UTC (rev 9951)
+++ trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.resx	2022-08-09 14:19:25 UTC (rev 9952)
@@ -112,9 +112,9 @@
     <value>2.0</value>
   </resheader>
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
 </root>
\ No newline at end of file

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs	2022-07-20 14:55:29 UTC (rev 9951)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs	2022-08-09 14:19:25 UTC (rev 9952)
@@ -11,9 +11,9 @@
         //Core
 
         /// <summary>
-        /// 0 - app pool name
+        /// 0 - app pool name, 1 - true/false for enabling 32-bit apps
         /// </summary>
-        const string CREATE_APP_POOL = "add apppool /name:\"{0}\" /managedRuntimeVersion:\"v4.0\"";
+        const string CREATE_APP_POOL = "add apppool /name:\"{0}\" /enable32BitAppOnWin64:{1} /managedRuntimeVersion:\"v4.0\"";
 
         /// <summary>
         /// 0 - php path
@@ -156,11 +156,12 @@
         private string _webSite;
         private string _virtualDir;
         private string _appPoolName;
+        private bool _enable32BitAppsOnWin64;
         private string _webExtensionsRootDir;
         private string _phpDir;
         private string _appCmdPath;
 
-        public AppCmd(string appCmdPath, string webSite, string virtualDir, string appPoolName, string webExtensionsRootDir, string phpDir)
+        public AppCmd(string appCmdPath, string webSite, string virtualDir, string appPoolName, string webExtensionsRootDir, string phpDir, bool enable32BitAppsOnWin64)
         {
             if (!File.Exists(appCmdPath))
                 throw new FileNotFoundException(appCmdPath);
@@ -181,6 +182,7 @@
             _appPoolName = appPoolName;
             _webExtensionsRootDir = webExtensionsRootDir;
             _phpDir = phpDir;
+            _enable32BitAppsOnWin64 = enable32BitAppsOnWin64;
         }
 
         private Process StartAppCmdProcess(string args)
@@ -199,7 +201,7 @@
             p = StartAppCmdProcess(string.Format(CREATE_FASTCGI, _phpDir));
             Trace.TraceInformation(p.StandardOutput.ReadToEnd()); p.WaitForExit();
             //if (p.ExitCode != 0) Debugger.Break();
-            p = StartAppCmdProcess(string.Format(CREATE_APP_POOL, _appPoolName));
+            p = StartAppCmdProcess(string.Format(CREATE_APP_POOL, _appPoolName, _enable32BitAppsOnWin64 ? "true" : "false"));
             Trace.TraceInformation(p.StandardOutput.ReadToEnd()); p.WaitForExit();
             //if (p.ExitCode != 0) Debugger.Break();
             p = StartAppCmdProcess(string.Format(SET_APP_POOL_PROPERTIES, _appPoolName));

Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs	2022-07-20 14:55:29 UTC (rev 9951)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs	2022-08-09 14:19:25 UTC (rev 9952)
@@ -63,6 +63,8 @@
 
         public string ApplicationPool { get; set; }
 
+        public bool Enable32BitAppsOnWin64 { get; set; }
+
         protected override void DoBackupConfigFiles()
         {
             
@@ -80,7 +82,7 @@
 
         protected override void ConfigureWebServer()
         {
-            var cmd = new AppCmd(this.AppCmdPath, this.WebSiteName, this.VirtualDirectoryName, this.ApplicationPool, this.WebTierRootDir, this.WebTierPhpDir);
+            var cmd = new AppCmd(this.AppCmdPath, this.WebSiteName, this.VirtualDirectoryName, this.ApplicationPool, this.WebTierRootDir, this.WebTierPhpDir, this.Enable32BitAppsOnWin64);
             cmd.SetupCore(this.Is64BitMapGuide);
             if (this.EnableDotNet)
                 cmd.SetDefaultDotNetViewer();



More information about the mapguide-commits mailing list