[mapguide-commits] r10215 - in sandbox/jng/installer_wix6: Libraries/MapGuide Web Extensions scripts

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Sep 13 02:13:41 PDT 2026


Author: jng
Date: 2026-09-13 02:13:38 -0700 (Sun, 13 Sep 2026)
New Revision: 10215

Modified:
   sandbox/jng/installer_wix6/Libraries/MapGuide Web Extensions/HarvestFiles.wxs
   sandbox/jng/installer_wix6/scripts/List-MsiFiles.ps1
Log:
Fix some incorrect file > feature assignments and ensure List-MsiFiles.ps1 releases its msi file handles.

Modified: sandbox/jng/installer_wix6/Libraries/MapGuide Web Extensions/HarvestFiles.wxs
===================================================================
--- sandbox/jng/installer_wix6/Libraries/MapGuide Web Extensions/HarvestFiles.wxs	2026-09-11 14:35:46 UTC (rev 10214)
+++ sandbox/jng/installer_wix6/Libraries/MapGuide Web Extensions/HarvestFiles.wxs	2026-09-13 09:13:38 UTC (rev 10215)
@@ -64,7 +64,6 @@
       <Files Include="$(var.MgSource)\Web\www\mapagent\*.dll" Directory="MAPAGENTLOCATION" />
       <Files Include="$(var.MgSource)\Web\www\mapagent\*.exe" Directory="MAPAGENTLOCATION" />
       <Files Include="$(var.MgSource)\Web\www\mapagent\*.fcgi" Directory="MAPAGENTLOCATION" />
-      <Files Include="$(var.MgSource)\Web\www\mapagent\*.js" Directory="MAPAGENTLOCATION" />
       <Files Include="$(var.MgSource)\Web\www\mapagent\*.so" Directory="MAPAGENTLOCATION" />
       <Files Include="$(var.MgSource)\Web\www\mapagent\COPYRIGHT" Directory="MAPAGENTLOCATION" />
     </ComponentGroup>
@@ -72,6 +71,7 @@
     <ComponentGroup Id="group_MAPAGENTTESTPAGEFILES">
       <Files Include="$(var.MgSource)\Web\www\mapagent\*.html" Directory="MAPAGENTLOCATION" />
       <Files Include="$(var.MgSource)\Web\www\mapagent\*.php" Directory="MAPAGENTLOCATION" />
+      <Files Include="$(var.MgSource)\Web\www\mapagent\*.js" Directory="MAPAGENTLOCATION" />
     </ComponentGroup>
 
     <ComponentGroup Id="group_MAPVIEWERASPXFILES">

Modified: sandbox/jng/installer_wix6/scripts/List-MsiFiles.ps1
===================================================================
--- sandbox/jng/installer_wix6/scripts/List-MsiFiles.ps1	2026-09-11 14:35:46 UTC (rev 10214)
+++ sandbox/jng/installer_wix6/scripts/List-MsiFiles.ps1	2026-09-13 09:13:38 UTC (rev 10215)
@@ -129,7 +129,15 @@
     if (-not (Test-Path -LiteralPath $Msi)) { throw "MSI file not found: $Msi" }
     $full = (Resolve-Path -LiteralPath $Msi).Path
     $installer = New-Object -ComObject WindowsInstaller.Installer
-    return $installer.GetType().InvokeMember('OpenDatabase', 'InvokeMethod', $null, $installer, @($full, 0))
+    try {
+        return $installer.GetType().InvokeMember('OpenDatabase', 'InvokeMethod', $null, $installer, @($full, 0))
+    }
+    finally {
+        # Release the Installer COM object immediately so it cannot keep the MSI open.
+        if ($null -ne $installer) {
+            try { [void][System.Runtime.InteropServices.Marshal]::FinalReleaseComObject($installer) } catch { }
+        }
+    }
 }
 
 function Split-FeatureList {
@@ -157,6 +165,7 @@
 function Read-MsiData {
     param([string]$Msi)
     $db = Open-Msi -Msi $Msi
+    try {
 
     $dirs = @{}
     foreach ($rec in (Invoke-MsiQuery $db 'SELECT `Directory`, `Directory_Parent`, `DefaultDir` FROM `Directory`')) {
@@ -225,6 +234,13 @@
         CompFeat   = $compFeat
         Files      = $files
     }
+    }
+    finally {
+        # Release the Database COM object so the MSI file handle is closed immediately.
+        if ($null -ne $db) {
+            try { [void][System.Runtime.InteropServices.Marshal]::FinalReleaseComObject($db) } catch { }
+        }
+    }
 }
 
 function Resolve-DirectoryPath {



More information about the mapguide-commits mailing list