-
Notifications
You must be signed in to change notification settings - Fork 45
WiX: parametrize authoring for toolchain MSIs #444
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
Conversation
c9c1dd9
to
2c0b86a
Compare
2c0b86a
to
3ddc40d
Compare
<?define VariantProductName = !(loc.BldAsserts_ProductName)?> | ||
<?define VariantCabName = bld.asserts.cab?> | ||
<?define ToolchainVersionedVariantDirectory= ToolchainVersionedAsserts ?> | ||
<?define VariantEnvironmentComponentGUID = ab52b870-23ee-42e8-9581-3fcbdfb9228c?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be here or should it go into shared.wxs along with the other GUID constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other ones need to change between major upgrades. this one just needs to have a guid to identify since the Id (UserPathVariable
) is not unique enough. it needs to be different from the other variant. so this is why i put it here.
We have 3 of these, in bld (toolchain\usr\bin), rtl (runtimes\usr\bin) and windowssdk(sdks\windows.sdk). we could pull them all out if you want, but not sure if that will add much value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, okay, we can leave this for now; I am hoping that once we switch to the experimental SDK, the RTL is going to be possible to install into the GAC. We will want to have the RTL that the compiler was built against installed as well as the one that we just built.
Tested at https://ci-external.swift.org/job/swift-PR-build-toolchain-windows/6018/artifact/build/artifacts/ - the test failure is unrelated. |
…he toolchain This changes introduces new toolchain variant for No-Assert. The authoring leverages our parametrization (#444) and only introduces a new set of project files and includes. **Note**: This does not change any of the existing Assert variant authoring or output (msi or cabs). The new msi's are only built if you pass `-IncludeNoAsserts` to `build.ps1`. No changes on CI are needed at this point. ## Changes: - New projects, and wxs with include files for bld, cli, dbg and ide. these result in producing new msi's `bld.noasserts.msi`, `cli.noasserts.msi`, `dbg.noasserts.msi` and `ide.noasserts.msi` - Installer Options UI now has a new option to choose which variant to install, or both (see images below) - Authoring for directories in shared.wxs to match the assert variant directories - New upgrade codes for the new msi's - New strings for the new msi's ## How does it work: - If the bundler is built without `-IncludeNoAsserts`, noassert toolcahin is not included, and the user will see a grayed out entry that can not be changed. bundler will install asserts variant only, just like today (see first image below) - If the bundler is built with `-IncludeNoAsserts`, both toolchain variants are included. the user has an option to install both (see second image), or only the noasserts variant (see third image). At least one has to be included. User can not be in a state where none is included (we ensure that through using enabled condition on the check boxes) - If both variants are installed, the path will be set to the assert toolchain (to maintain backward compatibility). if only the noassert variant is chosen, the path will be set to the no-assert toolchain path. ## Screenshots - Only Assert variant included: <img width="1262" height="1058" alt="Asserets-only" src="https://github.com/user-attachments/assets/db9c53db-4868-45fd-9b19-643b1abac11a" /> - Both variants included: <img width="1252" height="1046" alt="both" src="https://github.com/user-attachments/assets/d1b156e4-438b-4cde-b4b1-e270c65b3aca" /> - Only No-Assert included: <img width="1256" height="1038" alt="noasserts-only" src="https://github.com/user-attachments/assets/88fd22cc-e211-48fc-9e66-520b9b701673" />
This is a follow up change to #428, #433 and #433. And the last change before adding full toolchain variant msi's.
In this change we parametrize the authoring in the wxi files for bld, cli, dbg and ide. Similar to previous changes, this should not have any functional changes; it just makes the authoring reusable in the future to add new variants.
The changes are mostly mechanical. e.g. a directory id
toolchain_asserts_usr_include
becomestoolchain_$(VariantName)_usr_include
. This allows the same authoring to be used to create different layouts based on the variant without duplicating, and files added are added in one place.Changes include: