Skip to content
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

Migrate the Windows installer to WiX v4 #184

Merged
merged 2 commits into from
Mar 29, 2023
Merged

Migrate the Windows installer to WiX v4 #184

merged 2 commits into from
Mar 29, 2023

Conversation

tristanlabelle
Copy link
Contributor

@tristanlabelle tristanlabelle commented Mar 22, 2023

Migrates the Windows installer to WiX v4, SDK-style project and consuming WiX from Nuget, meaning that it doesn't need to be installed on the machine anymore. This also unblocks the arm64 installer.

I ran the WiX v4 converter extension in VS, then tweaked the output to minimize the diff. Many elements are slightly different in v4:

  • wixprojs are sdk-style, with <Project>. They require msbuild -restore.
  • wix extensions are served through nuget via <PackageReference>
  • Compressed="yes" is now default.
  • TARGETDIR should not be defined anymore
  • Condition syntax is slightly different
  • Absent="disallow" became allowAbsent="no"

How tested:

  • Built locally

Pending related changes to consuming repos. (adding -restore to the msbuild invocation)

platforms/Windows/devtools-amd64.wxs Show resolved Hide resolved
@@ -222,15 +223,15 @@
</ComponentGroup>
<?endif?>

<Feature Id="DeveloperTools" Absent="disallow" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift Developer Tools for Windows x86_64" Level="1" Title="Swift Developer Tools (Windows x86_64)">
<Feature Id="DeveloperTools" AllowAbsent="no" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift Developer Tools for Windows x86_64" Level="1" Title="Swift Developer Tools (Windows x86_64)">
<ComponentGroupRef Id="SwiftCollections" />
<ComponentGroupRef Id="SwiftSystem" />
<ComponentGroupRef Id="SwiftPackageManager" />
<ComponentGroupRef Id="SourceKitLSP" />

<?ifdef INCLUDE_DEBUG_INFO ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sidebar: I wonder if we should re-consider this. The debug information would bloat the installer download to ~4G (from ~400M), and the install from ~4G to ~25G. @shahmishal I figure that you might have some thoughts on this as well. The general recommendations for this seem to be "don't do it" and to prefer to use a Symbol Server instead.

platforms/Windows/toolchain.wixproj Show resolved Hide resolved
platforms/Windows/toolchain.wixproj Show resolved Hide resolved
platforms/Windows/toolchain.wixproj Show resolved Hide resolved

<!-- Features -->
<Feature Id="WinX64SDK" Absent="disallow" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift SDK for Windows x86_64" Level="1" Title="Swift SDK for Windows x86_64">
<Feature Id="WinX64SDK" AllowAdvertise="yes" ConfigurableDirectory="INSTALLDIR" Description="Swift SDK for Windows x86_64" Level="1" Title="Swift SDK for Windows x86_64" AllowAbsent="no">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would be nice to leave this in lexicographical ordering.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The converter added it to the end and I fixed it in most places but missed this one :/

@compnerd
Copy link
Member

Tested at swiftlang/swift#64691

@compnerd compnerd merged commit 2a30cde into swiftlang:main Mar 29, 2023
@tristanlabelle tristanlabelle deleted the migrate-to-wix-v4 branch March 29, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants