Skip to content

Commit 59a063a

Browse files
authored
WiX: Add packaging rules for swift-inspect
Add the packaging rules for swift-inspect. This prepares us to be able to start experimenting with swift-inspect on Swift developer's machines and start making progress towards enabling the full functionality for the tool on Windows. The PoR is to package the tool into the toolchain distribution subsequently.
1 parent af89b7b commit 59a063a

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project Sdk="WixToolset.Sdk/4.0.0">
2+
<PropertyGroup>
3+
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4+
</PropertyGroup>
5+
6+
<PropertyGroup>
7+
<ProductArchitecture Condition=" '$(ProductArchitecture)' == '' ">amd64</ProductArchitecture>
8+
<ProductArchitecture>$(ProductArchitecture)</ProductArchitecture>
9+
10+
<ProductVersion Condition=" '$(ProductVersion)' == '' ">0.0.0</ProductVersion>
11+
<ProductVersion>$(ProductVersion)</ProductVersion>
12+
</PropertyGroup>
13+
14+
<PropertyGroup>
15+
<OutputPath>build\</OutputPath>
16+
<IntermediateOutputPath>build\obj\</IntermediateOutputPath>
17+
</PropertyGroup>
18+
19+
<Import Project="WiXCodeSigning.targets" />
20+
21+
<PropertyGroup>
22+
<DefineConstants>ProductVersion=$(ProductVersion);ProductArchitecture=$(ProductArchitecture);SWIFT_INSPECT_BUILD=$(SWIFT_INSPECT_BUILD)</DefineConstants>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.0" />
27+
</ItemGroup>
28+
29+
<ItemGroup>
30+
<Compile Include="swift-inspect.wxs" />
31+
</ItemGroup>
32+
</Project>

platforms/Windows/swift-inspect.wxs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
2+
<Package
3+
Language="1033"
4+
Manufacturer="swift.org"
5+
Name="swift-inspect"
6+
UpgradeCode="269fd791-fb3d-4311-96a1-cb98243ee857"
7+
Version="$(var.ProductVersion)"
8+
Scope="perMachine">
9+
<SummaryInformation Description="swift-inspect" />
10+
11+
<!-- NOTE(compnerd) use pre-3.0 schema for better compatibility. -->
12+
<Media Id="1" Cabinet="SwiftFormat.cab" EmbedCab="yes" />
13+
14+
<!-- WindowsVolume is not a StandardDirectory value, but rather a standard property. See https://github.com/wixtoolset/issues/issues/7314 -->
15+
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]" />
16+
17+
<Directory ComponentGuidGenerationSeed="4541e7ac-4bf7-47f5-adb2-d3f63006cdcb" Id="WINDOWSVOLUME">
18+
<Directory Id="INSTALLDIR">
19+
<Directory Id="Library" Name="Library">
20+
<Directory Id="Developer" Name="Developer">
21+
<Directory Id="Tools" Name="Tools">
22+
<Component Id="swift_inspect.exe">
23+
<File Id="swift_inspect.exe" Source="$(var.SWIFT_INSPECT_BUILD)\swift-inspect.exe" Checksum="yes" />
24+
</Component>
25+
</Directory>
26+
</Directory>
27+
</Directory>
28+
29+
<Component Id="EnvironmentVariables" Guid="61ddbfd1-4051-4964-8a9b-fd0299a358f3">
30+
<Environment Id="Path" Action="set" Name="Path" Part="last" Permanent="no" System="yes" Value="[INSTALLDIR]Library\Developer\Tools" />
31+
</Component>
32+
</Directory>
33+
</Directory>
34+
35+
<Feature Id="SwiftInspect" AllowAbsent="no" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="SwiftInspect" Level="1" Title="SwiftInspect">
36+
<ComponentRef Id="swift_inspect.exe" />
37+
<ComponentRef Id="EnvironmentVariables" />
38+
</Feature>
39+
40+
<UI>
41+
<ui:WixUI Id="WixUI_InstallDir" />
42+
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2" />
43+
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" />
44+
</UI>
45+
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"></Property>
46+
47+
</Package>
48+
</Wix>

0 commit comments

Comments
 (0)