Kaydet (Commit) 49621418 authored tarafından Steve Dower's avatar Steve Dower

Removes versioning from py.exe launcher installer and ensures that old launchers…

Removes versioning from py.exe launcher installer and ensures that old launchers are replaced by newer ones.
üst 1cea70f0
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<UpgradeVersion Property="UPGRADE" Minimum="$(var.UpgradeMinimumVersion)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" /> <UpgradeVersion Property="UPGRADE" Minimum="$(var.UpgradeMinimumVersion)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" />
</Upgrade> </Upgrade>
<?ifdef CoreUpgradeCode ?>
<?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?> <?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
<?ifndef SkipMissingCore ?>
<Upgrade Id="$(var.CoreUpgradeCode)"> <Upgrade Id="$(var.CoreUpgradeCode)">
<UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" /> <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
</Upgrade> </Upgrade>
...@@ -47,9 +47,11 @@ ...@@ -47,9 +47,11 @@
</Fragment> </Fragment>
<Fragment> <Fragment>
<?ifdef InstallDirectoryGuidSeed ?>
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" /> <Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
</Directory> </Directory>
<?endif ?>
</Fragment> </Fragment>
<!-- Top-level directories --> <!-- Top-level directories -->
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>launcher</OutputName> <OutputName>launcher</OutputName>
<OutputType>Package</OutputType> <OutputType>Package</OutputType>
<DefineConstants>SkipMissingCore=1;$(DefineConstants)</DefineConstants> <DefineConstants>UpgradeCode=1B68A0EC-4DD3-5134-840E-73854B0863F1;$(DefineConstants)</DefineConstants>
<IgnoreCommonWxlTemplates>true</IgnoreCommonWxlTemplates>
</PropertyGroup> </PropertyGroup>
<Import Project="..\msi.props" /> <Import Project="..\msi.props" />
<ItemGroup> <ItemGroup>
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<MediaTemplate EmbedCab="yes" CompressionLevel="high" /> <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<Property Id="Suppress_TARGETDIR_Check" Value="1" /> <Property Id="Suppress_TARGETDIR_Check" Value="1" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="ARPPRODUCTICON" /> <PropertyRef Id="ARPPRODUCTICON" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)"> <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
...@@ -27,12 +26,18 @@ ...@@ -27,12 +26,18 @@
<Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom> <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
<Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom> <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
<RemoveExistingProducts After="InstallInitialize">UPGRADE or REMOVE_OLD_LAUNCHER</RemoveExistingProducts> <RemoveExistingProducts After="InstallValidate">UPGRADE or REMOVE_350_LAUNCHER</RemoveExistingProducts>
</InstallExecuteSequence> </InstallExecuteSequence>
<!-- Python 3.5.0 shipped with an incorrect UpgradeCode --> <!-- Python 3.5.0 shipped with a different UpgradeCode -->
<Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8"> <Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8">
<UpgradeVersion Maximum="$(var.Version)" Property="REMOVE_OLD_LAUNCHER" /> <UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_350_LAUNCHER" />
</Upgrade> </Upgrade>
<!-- Python 3.6.0a1 shipped with a different UpgradeCode -->
<Upgrade Id="394750C0-7880-5A8F-999F-933965FBCFB4">
<UpgradeVersion Maximum="$(var.Version)" Property="REMOVE_360A1_LAUNCHER" />
<UpgradeVersion Minimum="$(var.Version)" Property="BLOCK_360A1_LAUNCHER" />
</Upgrade>
<Condition Message="!(loc.NoDowngrade)">Installed OR NOT BLOCK_360A1_LAUNCHER</Condition>
</Product> </Product>
</Wix> </Wix>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization"> <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Launcher</String> <String Id="LCID">1033</String>
<String Id="ShortDescriptor">launcher</String> <String Id="Culture">en-us</String>
<String Id="ProductName">Python Launcher</String>
<String Id="Title">Python Launcher</String>
<String Id="Description">Python Launcher</String>
<String Id="Manufacturer">Python Software Foundation</String>
<String Id="NoDowngrade">A newer version of the Python launcher is already installed.</String>
<String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
<String Id="PythonFileDescription">Python File</String> <String Id="PythonFileDescription">Python File</String>
<String Id="PythonNoConFileDescription">Python File (no console)</String> <String Id="PythonNoConFileDescription">Python File (no console)</String>
<String Id="PythonCompiledFileDescription">Compiled Python File</String> <String Id="PythonCompiledFileDescription">Compiled Python File</String>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)common.wxs" /> <Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
<WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" /> <WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />
<WixExtension Include="WixUtilExtension"> <WixExtension Include="WixUtilExtension">
<HintPath>WixUtilExtension</HintPath> <HintPath>WixUtilExtension</HintPath>
<Name>WixUtilExtension</Name> <Name>WixUtilExtension</Name>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<Uri>lib2to3/pickles</Uri> <Uri>lib2to3/pickles</Uri>
</_Uuid> </_Uuid>
</ItemGroup> </ItemGroup>
<Target Name="_GenerateGuids" AfterTargets="PrepareForBuild"> <Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">
<PropertyGroup> <PropertyGroup>
<_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids> <_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>
<_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand> <_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</Target> </Target>
<Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl"> <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
<PropertyGroup> <PropertyGroup Condition="'@(WxlTemplate)' != ''">
<_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content> <_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
<_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent> <_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
</PropertyGroup> </PropertyGroup>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
Overwrite="true" Overwrite="true"
Condition="$(_Content) != $(_ExistingContent)" /> Condition="$(_Content) != $(_ExistingContent)" />
<ItemGroup> <ItemGroup Condition="'@(WxlTemplate)' != ''">
<EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" /> <EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
<FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" /> <FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
</ItemGroup> </ItemGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment