1<?xml version="1.0" encoding="UTF-8"?> 2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 3 <Fragment> 4 <Property Id="ROOTREGISTRYKEY" Value="Software\Python\PythonCore" /> 5 </Fragment> 6 7 <Fragment> 8 <Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" /> 9 </Fragment> 10 11 <Fragment> 12 <Component Id="OptionalFeature" Guid="*" Directory="InstallDirectory"> 13 <Condition>OPTIONALFEATURESREGISTRYKEY</Condition> 14 <RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]"> 15 <RegistryValue Type="string" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" KeyPath="yes" /> 16 </RegistryKey> 17 </Component> 18 </Fragment> 19 20 <Fragment> 21 <Property Id="UpgradeTable" Value="1" /> 22 23 <?ifndef SuppressUpgradeTable ?> 24 <Upgrade Id="$(var.UpgradeCode)"> 25 <UpgradeVersion Property="DOWNGRADE" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" /> 26 <UpgradeVersion Property="UPGRADE" Minimum="$(var.UpgradeMinimumVersion)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" /> 27 </Upgrade> 28 29 <?ifdef CoreUpgradeCode ?> 30 <?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?> 31 <Upgrade Id="$(var.CoreUpgradeCode)"> 32 <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" /> 33 </Upgrade> 34 <Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition> 35 <?endif ?> 36 <?endif ?> 37 38 <Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition> 39 <Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition> 40 41 <InstallExecuteSequence> 42 <RemoveExistingProducts After="InstallInitialize" Overridable="yes">UPGRADE</RemoveExistingProducts> 43 </InstallExecuteSequence> 44 <?endif ?> 45 </Fragment> 46 47 <Fragment> 48 <!-- Include an icon for the Programs and Features dialog --> 49 <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\python.ico" /> 50 <Property Id="ARPPRODUCTICON" Value="ARPIcon" /> 51 <Property Id="ARPNOMODIFY" Value="1" /> 52 <Property Id="DISABLEADVTSHORTCUTS" Value="1" /> 53 </Fragment> 54 55 <Fragment> 56 <Directory Id="TARGETDIR" Name="SourceDir"> 57 <?ifdef InstallDirectoryGuidSeed ?> 58 <Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" /> 59 <?endif ?> 60 </Directory> 61 </Fragment> 62 63 <Fragment> 64 <?ifdef PythonExeComponentGuid ?> 65 <!-- Locate TARGETDIR automatically assuming we have executables installed --> 66 <Property Id="TARGETDIR"> 67 <ComponentSearch Id="PythonExe_Directory" Guid="$(var.PythonExeComponentGuid)"> 68 <DirectorySearch Id="PythonExe_Directory" AssignToProperty="yes" Path="."> 69 <FileSearch Id="PythonExe_DirectoryFile" Name="python.exe" /> 70 </DirectorySearch> 71 </ComponentSearch> 72 </Property> 73 <?endif ?> 74 <Property Id="DetectTargetDir" Value="1" /> 75 </Fragment> 76 77 <!-- Top-level directories --> 78 <Fragment> 79 <DirectoryRef Id="InstallDirectory"> 80 <Directory Id="DLLs" Name="DLLs"> 81 <Directory Id="Catalogs" /> 82 </Directory> 83 </DirectoryRef> 84 </Fragment> 85 86 <Fragment> 87 <DirectoryRef Id="InstallDirectory"> 88 <Directory Id="Doc" Name="Doc"> 89 <Directory Id="Doc_html" Name="html" /> 90 </Directory> 91 </DirectoryRef> 92 </Fragment> 93 94 <Fragment> 95 <DirectoryRef Id="InstallDirectory"> 96 <Directory Id="include" Name="include" /> 97 </DirectoryRef> 98 </Fragment> 99 100 <Fragment> 101 <DirectoryRef Id="InstallDirectory"> 102 <Directory Id="Lib" Name="Lib" /> 103 </DirectoryRef> 104 </Fragment> 105 106 <Fragment> 107 <DirectoryRef Id="InstallDirectory"> 108 <Directory Id="libs" Name="libs" /> 109 </DirectoryRef> 110 </Fragment> 111 112 <Fragment> 113 <DirectoryRef Id="InstallDirectory"> 114 <Directory Id="Scripts" Name="Scripts" /> 115 </DirectoryRef> 116 </Fragment> 117 118 <Fragment> 119 <DirectoryRef Id="InstallDirectory"> 120 <Directory Id="tcl" Name="tcl" /> 121 </DirectoryRef> 122 </Fragment> 123 124 <Fragment> 125 <DirectoryRef Id="InstallDirectory"> 126 <Directory Id="Tools" Name="Tools" /> 127 </DirectoryRef> 128 </Fragment> 129 130 <!-- Start Menu folder --> 131 <Fragment> 132 <DirectoryRef Id="TARGETDIR"> 133 <Directory Id="ProgramMenuFolder"> 134 <Directory Id="MenuDir" Name="!(loc.ProductName)" /> 135 </Directory> 136 </DirectoryRef> 137 </Fragment> 138</Wix> 139