Skip to content

Commit 9729f3d

Browse files
committed
WiX: optionalise plutil through a hidden option
Add an option to elide `plutil` from installation. This is a tiny binary that is useful, but distributions may wish to remove it. Adjust the installer labels and also force install the runtime now that the compiler depends on it.
1 parent 537bce7 commit 9729f3d

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

platforms/Windows/bundle/installer.wxs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<Variable Name="OptionsInstallDbg" bal:Overridable="yes" Persisted="yes" Value="1" />
3333
<Variable Name="OptionsInstallIde" bal:Overridable="yes" Persisted="yes" Value="1" />
3434
<Variable Name="OptionsInstallRtl" Value="1" />
35+
<Variable Name="OptionsInstallUtl" bal:Overridable="yes" Persisted="yes" Value="1" />
3536
<Variable Name="OptionsInstallSdkX86" bal:Overridable="yes" Persisted="yes" Value="1" />
3637
<Variable Name="OptionsInstallRedistX86" bal:Overridable="yes" Persisted="yes" Value="1" />
3738
<Variable Name="OptionsInstallSdkAMD64" bal:Overridable="yes" Persisted="yes" Value="1" />
@@ -67,6 +68,7 @@
6768
SourceFile="!(bindpath.rtl)\rtl.msi"
6869
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
6970
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
71+
<MsiProperty Name="InstallUtilities" Value="[OptionsInstallUtl]" />
7072
</MsiPackage>
7173

7274
<MsiPackage

platforms/Windows/bundle/theme.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<Checkbox Name="OptionsInstallCli" X="176" Y="159" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Cli_ProductName)</Checkbox>
6161
<Checkbox Name="OptionsInstallDbg" X="176" Y="177" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Dbg_ProductName)</Checkbox>
6262
<Checkbox Name="OptionsInstallIde" X="176" Y="195" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Ide_ProductName)</Checkbox>
63-
<Checkbox Name="OptionsInstallRtl" X="176" Y="213" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Rtl_ProductName)</Checkbox>
63+
<Checkbox Name="OptionsInstallRtl" X="176" Y="213" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="0">#(loc.Rtl_ProductName)</Checkbox>
6464
<Checkbox Name="OptionsInstallSdkAMD64" X="176" Y="231" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Sdk_ProductName_amd64)</Checkbox>
6565
<Checkbox Name="OptionsInstallRedistAMD64" X="194" Y="249" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="OptionsInstallSdkAMD64">#(loc.Redist_amd64)</Checkbox>
6666
<Checkbox Name="OptionsInstallSdkArm64" X="176" Y="267" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.Sdk_ProductName_arm64)</Checkbox>

platforms/Windows/rtl/lib/rtllib.wxs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@
105105
<ComponentGroupRef Id="BlocksRuntime_$(ProductArchitecture)" />
106106
<ComponentGroupRef Id="libdispatch_$(ProductArchitecture)" />
107107
<ComponentGroupRef Id="Foundation_$(ProductArchitecture)" />
108+
</ComponentGroup>
109+
110+
<ComponentGroup Id="swift_runtime_utilities_$(ProductArchitecture)">
108111
<ComponentGroupRef Id="plutil_$(ProductArchitecture)" />
109112
</ComponentGroup>
110113
</Fragment>

platforms/Windows/rtl/msi/rtlmsi.wxs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,10 @@
3131
<ComponentGroupRef Id="EnvironmentVariables" />
3232
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
3333
</Feature>
34+
35+
<Feature Id="SwiftRuntimeUtilities" AllowAbsent="yes" Title="!(loc.Utl_ProductName_$(ProductArchitecture))">
36+
<Level Condition="INSTALLUTILITIES = 0" Value="0" />
37+
<ComponentGroupRef Id="swift_runtime_utilities_$(ProductArchitecture)" />
38+
</Feature>
3439
</Package>
3540
</Wix>

platforms/Windows/rtl/msm/rtlmsm.wxs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
Version="$(NonSemVerProductVersion)">
1616

1717
<ComponentGroupRef Id="swift_runtime_$(ProductArchitecture)" />
18+
<ComponentGroupRef Id="swift_runtime_utilities_$(ProductArchitecture)" />
1819
</Module>
1920
</Wix>

platforms/Windows/shared/swift.en-us.wxl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66
<String Id="Cli_ProductName" Value="Swift Command Line Tools" />
77
<String Id="Dbg_ProductName" Value="Swift Debugging Tools" />
88
<String Id="Ide_ProductName" Value="Swift IDE Integration Tools" />
9-
<String Id="Rtl_ProductName" Value="Swift Windows Utilities" />
9+
<String Id="Rtl_ProductName" Value="Swift Windows Runtime" />
1010
<String Id="VCRuntime_ProductName_arm64" Value="Visual C++ Runtime (ARM64)" />
1111
<String Id="VCRuntime_ProductName_amd64" Value="Visual C++ Runtime (AMD64)" />
1212
<String Id="VCRuntime_ProductName_x86" Value="Visual C++ Runtime (X86)" />
13-
<String Id="Rtl_ProductName_arm64" Value="Swift Windows Utilities (ARM64)" />
14-
<String Id="Rtl_ProductName_amd64" Value="Swift Windows Utilities (AMD64)" />
15-
<String Id="Rtl_ProductName_x86" Value="Swift Windows Utilities (X86)" />
13+
<String Id="Rtl_ProductName_arm64" Value="Swift Windows Runtime (ARM64)" />
14+
<String Id="Rtl_ProductName_amd64" Value="Swift Windows Runtime (AMD64)" />
15+
<String Id="Rtl_ProductName_x86" Value="Swift Windows Runtime (X86)" />
1616
<String Id="Sdk_ProductName_arm64" Value="Swift Windows SDK (ARM64)" />
1717
<String Id="Sdk_ProductName_amd64" Value="Swift Windows SDK (AMD64)" />
1818
<String Id="Sdk_ProductName_x86" Value="Swift Windows SDK (X86)" />
19+
<String Id="Utl_ProductName_arm64" Value="Swift Windows Utilities (ARM64)" />
20+
<String Id="Utl_ProductName_amd64" Value="Swift Windows Utilities (AMD64)" />
21+
<String Id="Utl_ProductName_x86" Value="Swift Windows Utilities (X86)" />
1922
<String Id="Android_Sdk_arm64" Value="Swift Android SDK (ARM64)" />
2023
<String Id="Android_Sdk_amd64" Value="Swift Android SDK (AMD64)" />
2124
<String Id="Android_Sdk_arm" Value="Swift Android SDK (ARM)" />

0 commit comments

Comments
 (0)