Skip to content

Commit 20fc162

Browse files
authored
Refactor WiX installer projects (#215)
## Deduplication - Move common .wixproj content to Directory.Build.props and Directory.Build.targets. - Move common authoring to a shared .wixlib project. - Add localization file for common strings. - Use ComponentGroup/@Directory for default component directories. ## Simplification - Move CompressionLevel into Directory.Build.props. - Have Directory.Build.props import <user>.props (say, to override CompressionLevel for faster local builds). - Remove Id attributes from resources that aren't explicitly referenced. - Remove redundant/irrelevant attributes (e.g., File/@keypath). - Use `ProjectReference`s to manage build order and bind paths, including three flavors of SDK. - Remove MSI UI as the bundle UI replaces it. * - Moved projects into subdirectories to... better support NuGet package restore. - With projects in subdirectories, enabled automatic project items for compilation and localization. - Added project references to bundle project to get proper build order. - Deduplicate project references to shared.wixproj. - Remove Feature/@ConfigurableDirectory because individual features can't be moved to other directories (just the root). * Address review feedback: - Localize MSI_LOCATION to bundle. - Undo custom bundle output name for compatibility. - Fix whitespace and EOF. - Conditionalize stuff not yet available on Arm64. - Harvest with stable GUIDs instead of generated GUIDs. * Absorb swift-format and swift-inspect.dbg... ...into cli and dbg, respectively, and: - Add placeholder MajorUpgrades (pending new upgrade strategy). - Add shared SystemToolsEnvironmentVariables component. * Fix TOOLCHAIN_ROOT_USR_LIB_CLANG path build break. * Embed cabinets (revisit on bundle redesign). * Revert to `Media` instead of `MediaTemplate`. `MediaTemplate` defaults to 200MB of source payloads for splitting into separate cabinets. WiX's "smart cabbing" feature works within a cabinet, eliminating duplicates -- but doesn't work across cabinets. So we're not getting rid of as much redundancy. We could adjust the 200MB threshold, but let's just explicitly author that we want a single cabinet to get the best possible compression (at least for a cabinet).
1 parent 3e41380 commit 20fc162

Some content is hidden

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

43 files changed

+1672
-2079
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ProductArchitecture Condition=" '$(ProductArchitecture)' == '' ">amd64</ProductArchitecture>
5+
<ProductArchitecture>$(ProductArchitecture)</ProductArchitecture>
6+
7+
<ProductVersion Condition=" '$(ProductVersion)' == '' ">0.0.0</ProductVersion>
8+
<ProductVersion>$(ProductVersion)</ProductVersion>
9+
</PropertyGroup>
10+
11+
<PropertyGroup Condition=" '$(ProductArchitecture)' == 'amd64' ">
12+
<Platform>x64</Platform>
13+
</PropertyGroup>
14+
<PropertyGroup Condition=" '$(ProductArchitecture)' == 'arm64' ">
15+
<Platform>arm64</Platform>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(ProductArchitecture)' == 'arm' ">
18+
<Platform>arm</Platform>
19+
</PropertyGroup>
20+
<PropertyGroup Condition=" '$(ProductArchitecture)' == 'x86' ">
21+
<Platform>x86</Platform>
22+
</PropertyGroup>
23+
24+
<PropertyGroup>
25+
<RootBuildFolder>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)build\))</RootBuildFolder>
26+
<BaseOutputPath>$(RootBuildFolder)</BaseOutputPath>
27+
<BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
28+
<OutputPath>$(BaseOutputPath)$(Configuration)\$(ProductArchitecture)\</OutputPath>
29+
30+
<DefaultCompressionLevel Condition="'$(DefaultCompressionLevel)' == ''">high</DefaultCompressionLevel>
31+
</PropertyGroup>
32+
33+
<PropertyGroup>
34+
<PackageScope>perMachine</PackageScope>
35+
<IsBundleCompressed>true</IsBundleCompressed>
36+
</PropertyGroup>
37+
38+
<Import Project="$(USERNAME).props" Condition="Exists('$(USERNAME).props')" />
39+
40+
<PropertyGroup>
41+
<DefineConstants>
42+
$(DefineConstants);
43+
ProductArchitecture=$(ProductArchitecture);
44+
ProductVersion=$(ProductVersion);
45+
PackageScope=$(PackageScope);
46+
IsBundleCompressed=$(IsBundleCompressed);
47+
</DefineConstants>
48+
</PropertyGroup>
49+
50+
<PropertyGroup >
51+
<PackageScope>perMachine</PackageScope>
52+
<IsBundleCompressed>true</IsBundleCompressed>
53+
</PropertyGroup>
54+
55+
<PropertyGroup>
56+
<HarvestNoLogo>true</HarvestNoLogo>
57+
<HarvestAutogenerateGuids>true</HarvestAutogenerateGuids>
58+
</PropertyGroup>
59+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup Condition="'$(MSBuildProjectName)' != 'shared'">
4+
<ProjectReference Include="..\shared\shared.wixproj" />
5+
</ItemGroup>
6+
7+
<Import Project="WiXCodeSigning.targets" />
8+
</Project>
-1.56 KB
Binary file not shown.
-9.24 KB
Binary file not shown.

platforms/Windows/bld.wixproj

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)