Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
WiX: simplify the swift-format package definition
- Use durable GUID generation for auto-generation of the GUID. - Combine the platform definitions into a singular source to avoid drift. This avoids having to keep the variants in sync and provides an easier upgrade path. This is the first step towards enabling a non-admin experience for users.
  • Loading branch information
compnerd committed May 27, 2023
commit c88d9c1de0cd507d08703262684154ffd63069f0
54 changes: 0 additions & 54 deletions platforms/Windows/swift-format-amd64.wxs

This file was deleted.

2 changes: 1 addition & 1 deletion platforms/Windows/swift-format.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
</ItemGroup>

<ItemGroup>
<Compile Include="swift-format-$(ProductArchitecture).wxs" />
<Compile Include="swift-format.wxs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,43 +1,33 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package
Language="1033"
Manufacturer="swift.org"
Name="Swift Code Formatter for Windows aarch64"
UpgradeCode="45f1ae7a-4d90-414d-80b3-a5a45898b212"
Version="$(var.ProductVersion)"
Scope="perMachine">
<SummaryInformation Description="Swift Code Formatter for Windows aarch64" />
<Package Language="1033" Manufacturer="swift.org" Name="Swift Code Formatter" UpgradeCode="45f1ae7a-4d90-414d-80b3-a5a45898b212" Version="$(var.ProductVersion)" Scope="perMachine">
<SummaryInformation Description="Swift Code Formatter" />

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

<!-- Directory Structure -->
<!-- WindowsVolume is not a StandardDirectory value, but rather a standard property. See https://github.com/wixtoolset/issues/issues/7314 -->
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]" />

<Directory ComponentGuidGenerationSeed="ab1b7ca9-b240-44c7-be8b-3cf1e34ad747" Id="WINDOWSVOLUME">
<Directory Id="INSTALLDIR">
<Directory Id="Library" Name="Library">
<Directory Id="Developer" Name="Developer">
<Directory Id="Tools" Name="Tools">
<Component Id="swift_format.exe">
<File Id="swift_format.exe" Source="$(var.SWIFT_FORMAT_BUILD)\swift-format.exe" Checksum="yes" />
</Component>
</Directory>
</Directory>
</Directory>

<Component Id="EnvironmentVariables" Guid="c1a01e55-3353-4eca-8b58-9960e57a3758">
<Environment Id="Path" Action="set" Name="Path" Part="last" Permanent="no" System="yes" Value="[INSTALLDIR]Library\Developer\Tools" />
</Component>
</Directory>
</Directory>

<!-- Components -->
<ComponentGroup Id="SwiftFormat">
<Component Id="swift_format.exe" Directory="Tools" Guid="1e6c84e1-6cf4-4e34-90f6-eb76c278f7e2">
<File Id="swift_format.exe" Source="$(var.SWIFT_FORMAT_BUILD)\swift-format.exe" Checksum="yes" />
</Component>
</ComponentGroup>

<Component Id="EnvironmentVariables" Directory="INSTALLDIR" Guid="c1a01e55-3353-4eca-8b58-9960e57a3758">
<Environment Id="Path" Action="set" Name="Path" Part="last" Permanent="no" System="yes" Value="[INSTALLDIR]Library\Developer\Tools" />
</Component>

<Feature Id="SwiftFormat" AllowAbsent="no" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift Code Formatter for Windows aarch64" Level="1" Title="Swift Code Formatter (Windows aarch64)">
<ComponentGroupRef Id="SwiftFormat" />
<Feature Id="SwiftFormat" AllowAbsent="no" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift Code Formatter" Level="1" Title="Swift Code Formatter">
<ComponentRef Id="swift_format.exe" />
<ComponentRef Id="EnvironmentVariables" />
</Feature>

Expand All @@ -46,9 +36,10 @@
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2" />
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" />
</UI>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"></Property>

<WixVariable Id="WixUIDialogBmp" Value="Resources\swift_dialog.png" />
<WixVariable Id="WixUIBannerBmp" Value="Resources\swift_banner.png" />

</Package>
</Wix>