Skip to content

Commit 299b4f6

Browse files
authored
Use WiX Toolset v4 (#1623)
* Use WiX Toolset v4 * Add restore * Fix formatting
1 parent 1531bf1 commit 299b4f6

218 files changed

Lines changed: 63 additions & 50441 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Package/msi/Dlr.wxs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
32
<Fragment>
43
<DirectoryRef Id="INSTALLDIR">
54
<Component>
6-
<File Source="$(var.PlatformDir)\Microsoft.Scripting.dll" />
5+
<File Id="Microsoft.Scripting.dll" Source="$(var.PlatformDir)\Microsoft.Scripting.dll" />
76
</Component>
87

98
<Component>
10-
<File Source="$(var.PlatformDir)\Microsoft.Dynamic.dll" />
9+
<File Id="Microsoft.Dynamic.dll" Source="$(var.PlatformDir)\Microsoft.Dynamic.dll" />
1110
</Component>
1211
</DirectoryRef>
1312

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildThisFileDirectory)..\..\Directory.Build.props" />
4-
<Import Project="$(RootDir)packages\wix\3.11.2\build\wix.props" />
1+
<Project Sdk="WixToolset.Sdk/4.0.0-rc.1" DefaultTargets="Build">
52
<PropertyGroup>
6-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
73
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
84
<ProductVersion>3.4</ProductVersion>
9-
<ProjectGuid>{49c7ae2b-d9d1-4b32-9d11-474f1be86658}</ProjectGuid>
10-
<SchemaVersion>2.0</SchemaVersion>
115
<OutputName>IronPython-$(DisplayVersion)</OutputName>
12-
<OutputType>Package</OutputType>
13-
<DefineSolutionProperties>false</DefineSolutionProperties>
146
<SuppressPdbOutput>true</SuppressPdbOutput>
157
<SuppressSpecificWarnings>5151</SuppressSpecificWarnings>
168
<SuppressIces>ICE61</SuppressIces>
17-
<BindInputPaths Condition=" '$(BindInputPaths)' == '' ">$(RootDir)Package\Stage\$(Configuration)\IronPython-$(DisplayVersion)</BindInputPaths>
9+
<BindInputPaths Condition=" '$(BindInputPaths)' == '' ">$(RootDir)Package\$(Configuration)\Stage\IronPython-$(DisplayVersion)</BindInputPaths>
1810
<BuildDir Condition=" '$(BuildDir)' == '' ">$(RootDir)bin\$(Configuration)</BuildDir>
19-
2011
<MsiVersion Condition=" '$(MsiVersion)' == '' ">$(MajorVersion).$(MinorVersion).$(MicroVersion).$(AssemblyFileRevision)</MsiVersion>
2112
<SetMsiAssemblyNameFileVersion>True</SetMsiAssemblyNameFileVersion>
2213
</PropertyGroup>
23-
2414
<ItemGroup>
2515
<WixConstant Include="ProductVersion">
2616
<Value>$(MsiVersion)</Value>
@@ -41,44 +31,23 @@
4131
<Value>$(BindInputPaths)\net462</Value>
4232
</WixConstant>
4333
</ItemGroup>
44-
4534
<PropertyGroup>
46-
<CommonWixConstants>@(WixConstant->'%(Identity)=%(Value)')</CommonWixConstants>
35+
<CommonWixConstants>@(WixConstant-&gt;'%(Identity)=%(Value)')</CommonWixConstants>
4736
</PropertyGroup>
48-
4937
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
50-
<OutputPath Condition=" '$(OutputPath)' == '' ">bin\$(Configuration)\</OutputPath>
51-
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
5238
<DefineConstants>Debug;$(CommonWixConstants)</DefineConstants>
5339
</PropertyGroup>
54-
5540
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
56-
<OutputPath Condition=" '$(OutputPath)' == '' ">bin\$(Configuration)\</OutputPath>
57-
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
5841
<DefineConstants>$(CommonWixConstants)</DefineConstants>
5942
</PropertyGroup>
60-
61-
<ItemGroup>
62-
<Compile Include="Dlr.wxs" />
63-
<Compile Include="IronPython.wxs" />
64-
<Compile Include="Product.wxs" />
65-
</ItemGroup>
6643
<ItemGroup>
6744
<Content Include="Version.wxi" />
6845
</ItemGroup>
6946
<ItemGroup>
70-
<WixExtension Include="WixUIExtension">
71-
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
72-
<Name>WixUIExtension</Name>
73-
</WixExtension>
74-
<WixExtension Include="WixNetFxExtension">
75-
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
76-
<Name>WixNetFxExtension</Name>
77-
</WixExtension>
78-
<WixExtension Include="WixUtilExtension">
79-
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
80-
<Name>WixUtilExtension</Name>
81-
</WixExtension>
47+
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.0-rc.1" />
48+
<PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.0-rc.1" />
49+
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.0-rc.1" />
50+
<PackageReference Include="WixToolset.Heat" Version="4.0.0-rc.1" />
8251
</ItemGroup>
8352
<ItemGroup>
8453
<HarvestDirectory Include="$(BindInputPaths)\Lib">
@@ -88,5 +57,4 @@
8857
<SuppressRegistry>True</SuppressRegistry>
8958
</HarvestDirectory>
9059
</ItemGroup>
91-
<Import Project="$(WixTargetsPath)" />
9260
</Project>

Package/msi/IronPython.wxs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,78 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<?include Version.wxi ?>
3-
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
1+
<?include Version.wxi ?>
2+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:netfx="http://wixtoolset.org/schemas/v4/wxs/netfx">
43
<Fragment>
54
<DirectoryRef Id="INSTALLDIR">
65

76
<Component>
8-
<File Source="$(var.PlatformDir)\IronPython.dll" />
7+
<File Id="IronPython.dll" Source="$(var.PlatformDir)\IronPython.dll" />
98
</Component>
109

1110
<Component>
12-
<File Source="$(var.PlatformDir)\IronPython.Modules.dll" />
11+
<File Id="IronPython.Modules.dll" Source="$(var.PlatformDir)\IronPython.Modules.dll" />
1312
</Component>
1413

1514
<Component>
16-
<File Source="$(var.PlatformDir)\ipy.exe">
15+
<File Id="ipy.exe" Source="$(var.PlatformDir)\ipy.exe">
1716
<netfx:NativeImage Id="ngen_ipy.exe" Platform="all" AppBaseDirectory="INSTALLDIR" />
1817
</File>
1918
</Component>
2019
<Component>
21-
<File Source="$(var.PlatformDir)\ipy32.exe">
20+
<File Id="ipy32.exe" Source="$(var.PlatformDir)\ipy32.exe">
2221
<netfx:NativeImage Id="ngen_ipy32.exe" Platform="all" AppBaseDirectory="INSTALLDIR" />
2322
</File>
2423
</Component>
2524

2625
<Component>
27-
<File Source="$(var.PlatformDir)\ipyc.exe">
26+
<File Id="ipyc.exe" Source="$(var.PlatformDir)\ipyc.exe">
2827
<netfx:NativeImage Id="ngen_ipyc.exe" Platform="all" AppBaseDirectory="INSTALLDIR" />
2928
</File>
3029
</Component>
3130
<Component>
32-
<File Source="$(var.PlatformDir)\IKVM.Reflection.dll" />
31+
<File Id="IKVM.Reflection.dll" Source="$(var.PlatformDir)\IKVM.Reflection.dll" />
3332
</Component>
3433

3534
<Component>
36-
<File Source="$(var.PlatformDir)\ipyw.exe">
35+
<File Id="ipyw.exe" Source="$(var.PlatformDir)\ipyw.exe">
3736
<netfx:NativeImage Id="ngen_ipyw.exe" Platform="all" AppBaseDirectory="INSTALLDIR" />
3837
</File>
3938
</Component>
4039
<Component>
41-
<File Source="$(var.PlatformDir)\ipyw32.exe">
40+
<File Id="ipyw32.exe" Source="$(var.PlatformDir)\ipyw32.exe">
4241
<netfx:NativeImage Id="ngen_ipyw32.exe" Platform="all" AppBaseDirectory="INSTALLDIR" />
4342
</File>
4443
</Component>
4544

4645
<Directory Id="IronPython_DLLs" Name="DLLs">
4746
<Component>
48-
<File Source="$(var.PlatformDir)\DLLs\IronPython.Wpf.dll" />
47+
<File Id="IronPython.Wpf.dll" Source="$(var.PlatformDir)\DLLs\IronPython.Wpf.dll" />
4948
</Component>
5049
<Component>
51-
<File Source="$(var.PlatformDir)\DLLs\IronPython.SQLite.dll" />
50+
<File Id="IronPython.SQLite.dll" Source="$(var.PlatformDir)\DLLs\IronPython.SQLite.dll" />
5251
</Component>
5352
</Directory>
5453

5554
<Component>
56-
<File Source="$(var.PlatformDir)\System.Buffers.dll" />
55+
<File Id="System.Buffers.dll" Source="$(var.PlatformDir)\System.Buffers.dll" />
5756
</Component>
5857
<Component>
59-
<File Source="$(var.PlatformDir)\System.Memory.dll" />
58+
<File Id="System.Memory.dll" Source="$(var.PlatformDir)\System.Memory.dll" />
6059
</Component>
6160
<Component>
62-
<File Source="$(var.PlatformDir)\System.Numerics.Vectors.dll" />
61+
<File Id="System.Numerics.Vectors.dll" Source="$(var.PlatformDir)\System.Numerics.Vectors.dll" />
6362
</Component>
6463
<Component>
65-
<File Source="$(var.PlatformDir)\System.Runtime.CompilerServices.Unsafe.dll" />
64+
<File Id="System.Runtime.CompilerServices.Unsafe.dll" Source="$(var.PlatformDir)\System.Runtime.CompilerServices.Unsafe.dll" />
6665
</Component>
6766

6867
<Component>
69-
<File Source="LICENSE" />
68+
<File Id="LICENSE" Source="LICENSE" />
7069
</Component>
7170
<Component>
72-
<File Source="README.md" />
71+
<File Id="README.md" Source="README.md" />
7372
</Component>
7473

7574
<Component>
76-
<RegistryValue Id="InstallationKey"
77-
Root="HKLM" Key="SOFTWARE\IronPython\$(var.ReleaseSeries)\InstallPath" Type="string" Value="[INSTALLDIR]" />
75+
<RegistryValue Id="InstallationKey" Root="HKLM" Key="SOFTWARE\IronPython\$(var.ReleaseSeries)\InstallPath" Type="string" Value="[INSTALLDIR]" />
7876
</Component>
7977

8078
<Component Id="CommonPythonRegistration">

Package/msi/Msi.Packaging.targets

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
33
<Target Name="MsiPackage" Condition="'$(OS)' != 'Unix'" DependsOnTargets="Stage" AfterTargets="Package">
4-
<PropertyGroup>
5-
<WixVersion>3.11.2</WixVersion>
6-
</PropertyGroup>
7-
<Exec Command="$(NuGet) install wix -Version $(WixVersion) -OutputDirectory &quot;$(RootDir)packages&quot; -Source https://api.nuget.org/v3/index.json" />
4+
<MSBuild Targets="Restore" Projects="$(RootDir)Package\msi\IronPython.Installer.wixproj" />
85
<MSBuild
96
Projects="$(RootDir)Package\msi\IronPython.Installer.wixproj"
107
Properties="BindInputPaths=$(StageDir);OutputPath=$(PackageDir);Configuration=$(Configuration);Platform=x64"

Package/msi/Product.wxs

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<!--
1+
<!--
42
IronPython installer root features, upgrades, and product definition
53
2006-01-01 BobArnso Created
64
-->
@@ -15,16 +13,16 @@ WHEN PERFORMING MAJOR IP UPGRADES (e.g., 2.5 => 2.6):
1513

1614
<?define UpgradeCode = "664cd4f7-5c34-441e-b3d0-dba395e9414f" ?>
1715

18-
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
19-
<Product Id="*" UpgradeCode="$(var.UpgradeCode)" Name="$(var.ProductShortName) $(var.ProductVersionText)" Version="$(var.ProductVersion)" Language="1033" Manufacturer="$(var.Manufacturer)">
20-
<Package Id="*" Compressed="yes" Description="$(var.ProductShortName) $(var.ProductVersionText) ($(var.ProductVersion))" InstallerVersion="200" ShortNames="no" Manufacturer="$(var.Manufacturer)" InstallScope="perMachine" />
16+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
17+
<Package UpgradeCode="$(var.UpgradeCode)" Name="$(var.ProductShortName) $(var.ProductVersionText)" Version="$(var.ProductVersion)" Language="1033" Manufacturer="$(var.Manufacturer)" InstallerVersion="200" ShortNames="no">
18+
<SummaryInformation Description="$(var.ProductShortName) $(var.ProductVersionText) ($(var.ProductVersion))" Manufacturer="$(var.Manufacturer)" />
19+
2120
<Media Id="1" Cabinet="IronPy.cab" EmbedCab="yes" CompressionLevel="high" />
2221

2322
<Icon Id="ipy.ico" SourceFile="..\..\Src\IronPythonConsole\ipy.ico" />
2423

2524
<!-- Major upgrade -->
26-
<MajorUpgrade AllowSameVersionUpgrades="no"
27-
DowngradeErrorMessage="A later version of [ProductName] is already installed."/>
25+
<MajorUpgrade AllowSameVersionUpgrades="no" DowngradeErrorMessage="A later version of [ProductName] is already installed." />
2826

2927
<!-- Normal upgrades -->
3028
<Upgrade Id="$(var.UpgradeCode)">
@@ -52,21 +50,11 @@ WHEN PERFORMING MAJOR IP UPGRADES (e.g., 2.5 => 2.6):
5250
</Property>
5351

5452
<!-- Launch conditions -->
55-
<Condition Message="An administrator must approve or install [ProductName]."><![CDATA[Privileged]]></Condition>
56-
<Condition Message="[ProductName] requires .NET Framework 4.6.2 or later."><![CDATA[Installed OR WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED]]></Condition>
53+
<Launch Condition="Privileged" Message="An administrator must approve or install [ProductName]." />
54+
<Launch Condition="Installed OR WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED" Message="[ProductName] requires .NET Framework 4.6.2 or later." />
5755

5856
<!-- Root directories -->
59-
<Directory Id="TARGETDIR" Name="SourceDir">
60-
<Directory Id="ProgramMenuFolder">
61-
<Directory Id="IronPythonStartMenu" Name="$(var.ProductShortName) $(var.ReleaseSeries)" />
62-
</Directory>
6357

64-
<Directory Id="ProgramFiles64Folder">
65-
<Directory Id="INSTALLDIR" Name="$(var.ProductShortName) $(var.ReleaseSeries)" />
66-
</Directory>
67-
68-
<Directory Id="GAC" Name="GAC" />
69-
</Directory>
7058

7159
<DirectoryRef Id="IronPythonStartMenu">
7260
<Component Id="IronPythonCommonShortcuts">
@@ -79,8 +67,8 @@ WHEN PERFORMING MAJOR IP UPGRADES (e.g., 2.5 => 2.6):
7967
</DirectoryRef>
8068

8169
<!-- Features - listed in the UI in the same order as they appear here -->
82-
<Feature Id="Feature_IronPython" ConfigurableDirectory="INSTALLDIR" Absent="disallow" AllowAdvertise="no" Display="expand" Level="1" Title="IronPython">
83-
<Feature Id="Feature_Core" Absent="disallow" AllowAdvertise="no" Display="collapse" Level="1" Title="IronPython" Description="IronPython binaries for the Desktop CLR.">
70+
<Feature Id="Feature_IronPython" ConfigurableDirectory="INSTALLDIR" AllowAdvertise="no" Display="expand" Level="1" Title="IronPython" AllowAbsent="no">
71+
<Feature Id="Feature_Core" AllowAdvertise="no" Display="collapse" Level="1" Title="IronPython" Description="IronPython binaries for the Desktop CLR." AllowAbsent="no">
8472
<ComponentGroupRef Id="Dlr" />
8573
<ComponentGroupRef Id="IronPython" />
8674
<ComponentGroupRef Id="IronPythonStdLib" />
@@ -93,7 +81,7 @@ WHEN PERFORMING MAJOR IP UPGRADES (e.g., 2.5 => 2.6):
9381

9482

9583
<!-- User interface -->
96-
<UIRef Id="WixUI_FeatureTree" />
84+
<ui:WixUI Id="WixUI_FeatureTree" />
9785
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
9886
<WixVariable Id="WixUIDialogBmp" Value="ironpython.bmp" />
9987
<WixVariable Id="WixUIBannerBmp" Value="banner.bmp" />
@@ -103,23 +91,33 @@ WHEN PERFORMING MAJOR IP UPGRADES (e.g., 2.5 => 2.6):
10391

10492
<!-- Install/uninstall pip -->
10593
<?if $(var.Platform)~="x64" ?>
106-
<CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" />
107-
<CustomAction Id="RemovePip" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" />
108-
<?else ?>
109-
<CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no" />
110-
<CustomAction Id="RemovePip" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no" />
111-
<?endif ?>
94+
<CustomAction Id="UpdatePip" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
95+
<CustomAction Id="RemovePip" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
96+
<?else?>
97+
<CustomAction Id="UpdatePip" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
98+
<CustomAction Id="RemovePip" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
99+
<?endif?>
112100

113101
<SetProperty Id="UpdatePip" Value="&quot;[#ipy.exe]&quot; -E -s -m ensurepip -U --default-pip" Before="UpdatePip" Sequence="execute" />
114102
<SetProperty Id="RemovePip" Value="&quot;[#ipy.exe]&quot; -E -s -B -m ensurepip._uninstall" Before="RemovePip" Sequence="execute" />
115103

116104
<!-- Sequences -->
117105
<InstallExecuteSequence>
118106
<Custom Action="SetInstallLocation" After="InstallValidate" />
119-
<Custom Action="UpdatePip" After="InstallFiles"><![CDATA[(&Pip_Setup=3) AND NOT Installed]]></Custom>
120-
<Custom Action="RemovePip" Before="RemoveFiles"><![CDATA[(!Pip_Setup<>2) AND Installed]]></Custom>
107+
<Custom Action="UpdatePip" After="InstallFiles" Condition="(&amp;Pip_Setup=3) AND NOT Installed" />
108+
<Custom Action="RemovePip" Before="RemoveFiles" Condition="(!Pip_Setup&lt;&gt;2) AND Installed" />
121109
</InstallExecuteSequence>
122110

123-
</Product>
111+
112+
<StandardDirectory Id="ProgramMenuFolder">
113+
<Directory Id="IronPythonStartMenu" Name="$(var.ProductShortName) $(var.ReleaseSeries)" />
114+
</StandardDirectory>
115+
116+
<StandardDirectory Id="ProgramFiles64Folder">
117+
<Directory Id="INSTALLDIR" Name="$(var.ProductShortName) $(var.ReleaseSeries)" />
118+
</StandardDirectory>
119+
120+
<Directory Id="GAC" Name="GAC" />
121+
</Package>
124122

125123
</Wix>

Package/msi/Version.wxi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Include Id="VersionNumberInclude">
1+
<Include Id="VersionNumberInclude" xmlns="http://wixtoolset.org/schemas/v4/wxs">
32
<?define ProductShortName = "IronPython" ?>
43
<?define Manufacturer = "IronPython Team" ?>
5-
</Include>
4+
</Include>

Util/Wix/LuxTasks.dll

-28 KB
Binary file not shown.
-48 KB
Binary file not shown.
-36 KB
Binary file not shown.
-44 KB
Binary file not shown.

0 commit comments

Comments
 (0)