Issue #25165: Windows uninstallation should not remove launcher if other versions...
authorSteve Dower <steve.dower@microsoft.com>
Thu, 1 Oct 2015 22:19:39 +0000 (15:19 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Thu, 1 Oct 2015 22:19:39 +0000 (15:19 -0700)
Misc/NEWS
Tools/msi/common.wxs
Tools/msi/launcher/launcher.wixproj
Tools/msi/launcher/launcher.wxs

index 354e9ec1d14b5b62d5a1a8117b2b5198d77fa8ca..b7f42a2b5c92a3b0a864b24c73f03a850de84f05 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -244,7 +244,10 @@ Build
 Windows
 -------
 
-- Issues #25112: py.exe launcher is missing icons
+- Issue #25165: Windows uninstallation should not remove launcher if other
+  versions remain
+
+- Issue #25112: py.exe launcher is missing icons
 
 - Issue #25102: Windows installer does not precompile for -O or -OO.
 
index 9f96bd3f4cdc525de7c29898d80a6ea27093fac9..100a0138db318be01f78ef5b09e73696a546f5f3 100644 (file)
         </Upgrade>
         
         <?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
+        <?ifndef SkipMissingCore ?>
         <Upgrade Id="$(var.CoreUpgradeCode)">
             <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
         </Upgrade>
+        <Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
+        <?endif ?>
         <?endif ?>
         
         <Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition>
-        <Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
         <Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition>
 
         <InstallExecuteSequence>
-            <RemoveExistingProducts After="InstallInitialize">UPGRADE</RemoveExistingProducts>
+            <RemoveExistingProducts After="InstallInitialize" Overridable="yes">UPGRADE</RemoveExistingProducts>
         </InstallExecuteSequence>
     </Fragment>
     
index 73f26a8e19796e6fcd10fcda67590048cb96f98a..a0f1d574fca0bb540cd8eb5cb2785164a792cf2d 100644 (file)
@@ -5,6 +5,7 @@
         <SchemaVersion>2.0</SchemaVersion>
         <OutputName>launcher</OutputName>
         <OutputType>Package</OutputType>
+        <DefineConstants>SkipMissingCore=1;$(DefineConstants)</DefineConstants>
     </PropertyGroup>
     <Import Project="..\msi.props" />
     <ItemGroup>
index b20cff859d236375c8377ca1e27e6345461c3cd4..718b666a5c74b1268a3bca8b7ab5e1d7b99f063c 100644 (file)
         <InstallExecuteSequence>
             <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
             <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
+
+            <RemoveExistingProducts After="InstallInitialize">UPGRADE or REMOVE_OLD_LAUNCHER</RemoveExistingProducts>
         </InstallExecuteSequence>
+        
+        <!-- Python 3.5.0 shipped with an incorrect UpgradeCode -->
+        <Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8">
+            <UpgradeVersion Maximum="$(var.Version)" Property="REMOVE_OLD_LAUNCHER" />
+        </Upgrade>
     </Product>
 </Wix>