Skip to content

WiX: simplify the swift-format package definition #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>