Skip to content

Commit c7dce9d

Browse files
committed
Simplify wix files for SwiftFormat.
Use autogenerated GUIDs. Merge the two wxs files into one.
1 parent 3988019 commit c7dce9d

File tree

3 files changed

+16
-69
lines changed

3 files changed

+16
-69
lines changed

installer-scripts/SwiftFormat-arm64.wxs

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

installer-scripts/SwiftFormat.wixproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
<!-- <Import Project="WiXCodeSigning.targets" /> -->
2020

2121
<PropertyGroup>
22-
<DefineConstants>ProductVersion=$(ProductVersion);SWIFTFORMAT_BUILD=$(SWIFTFORMAT_BUILD)</DefineConstants>
22+
<DefineConstants>ProductVersion=$(ProductVersion);ProductArchitecture=$(ProductArchitecture);SWIFTFORMAT_BUILD=$(SWIFTFORMAT_BUILD)</DefineConstants>
2323
</PropertyGroup>
2424

2525
<ItemGroup>
2626
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.0" />
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<Compile Include="SwiftFormat-$(ProductArchitecture).wxs" />
30+
<Compile Include="SwiftFormat.wxs" />
3131
</ItemGroup>
3232
</Project>

installer-scripts/SwiftFormat-amd64.wxs renamed to installer-scripts/SwiftFormat.wxs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,41 @@
22
<Package
33
Language="1033"
44
Manufacturer="nicklockwood"
5-
Name="SwiftFormat for Windows x86_64"
5+
Name="SwiftFormat for Windows $(var.ProductArchitecture)"
66
UpgradeCode="98e01ac8-a17d-43fd-99ed-1cd8b58715bf"
77
Version="$(var.ProductVersion)"
88
Scope="perMachine">
9-
<SummaryInformation Description="SwiftFormat for Windows x86_64" />
9+
<SummaryInformation Description="SwiftFormat for Windows $(var.ProductArchitecture)" />
1010

1111
<!-- NOTE(compnerd) use pre-3.0 schema for better compatibility. -->
1212
<Media Id="1" Cabinet="SwiftFormat.cab" EmbedCab="yes" />
1313

1414
<!-- Directory Structure -->
15+
<!-- Components -->
16+
1517
<!-- WindowsVolume is not a StandardDirectory value, but rather a standard property. See https://github.com/wixtoolset/issues/issues/7314 -->
1618
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]" />
19+
1720
<Directory ComponentGuidGenerationSeed="7818d7fe-5173-4a41-9809-e72263ea9738" Id="WINDOWSVOLUME">
1821
<Directory Id="INSTALLDIR">
1922
<Directory Id="Library" Name="Library">
2023
<Directory Id="Developer" Name="Developer">
2124
<Directory Id="Tools" Name="Tools">
25+
<Component Id="swiftformat.exe">
26+
<File Id="swiftformat.exe" Source="$(var.SWIFTFORMAT_BUILD)\swiftformat.exe" Checksum="yes" />
27+
</Component>
2228
</Directory>
2329
</Directory>
2430
</Directory>
31+
<Component Id="EnvironmentVariables" Guid="b46687c3-f836-47e5-9b43-d9fd2552a731">
32+
<!-- <Component Id="EnvironmentVariables"> -->
33+
<Environment Id="Path" Action="set" Name="Path" Part="last" Permanent="no" System="yes" Value="[INSTALLDIR]Library\Developer\Tools" />
34+
</Component>
2535
</Directory>
2636
</Directory>
2737

28-
<!-- Components -->
29-
<ComponentGroup Id="SwiftFormat">
30-
<Component Id="swiftformat.exe" Directory="Tools" Guid="77126634-5f91-40a7-b344-035ce99ef46f">
31-
<File Id="swiftformat.exe" Source="$(var.SWIFTFORMAT_BUILD)\swiftformat.exe" Checksum="yes" />
32-
</Component>
33-
</ComponentGroup>
34-
35-
<Component Id="EnvironmentVariables" Directory="INSTALLDIR" Guid="b46687c3-f836-47e5-9b43-d9fd2552a731">
36-
<Environment Id="Path" Action="set" Name="Path" Part="last" Permanent="no" System="yes" Value="[INSTALLDIR]Library\Developer\Tools" />
37-
</Component>
38-
39-
<Feature Id="SwiftFormat" AllowAbsent="no" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="SwiftFormat for Windows x86_64" Level="1" Title="SwiftFormat (Windows x86_64)">
40-
<ComponentGroupRef Id="SwiftFormat" />
38+
<Feature Id="SwiftFormat" AllowAbsent="no" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="SwiftFormat for Windows $(var.ProductArchitecture)" Level="1" Title="SwiftFormat (Windows $(var.ProductArchitecture))">
39+
<ComponentRef Id="swiftformat.exe" />
4140
<ComponentRef Id="EnvironmentVariables" />
4241
</Feature>
4342

0 commit comments

Comments
 (0)