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

msi: migrate to WiX4 #45943

Merged

Conversation

StefanStojanovic
Copy link
Contributor

Currently, two versions of the WiX Toolset are used to build the MSI installers. WiX v3.11 is used for x86 and x64, and WiX v3.14 is used for ARM64, which is not a stable release. This PR aims to migrate Node's MSI installer to WiX4 to unify all installers under a single version and remove all dependencies to WiX3, e.g. it can be removed from the CI machines.

In addition, using any WiX3 version requires it to be installed on the machine. Also, the WiX team is dropping support for v3 and they are encouraging users to move to v4.

This PR uses WiX rc-1, released on 16th December 2022. No big changes are expected until GA other than documentation updates and minor fixes. I've tested this extensively, including upgrade scenarios, and I believe this is good to be used on Node as is. Anyway, I plan to update to the stable version when it is released.

In this PR, the way to download WiX is changed to leverage MSBuild, as recommended for WiX v4. This includes an update to BUILDING.md, making it simpler, and is expected to work out of the box in CI machines.

About semver, this should only add support for ARM64. Everything else should stay the same. So, I think this should be semver-minor.

Refs: nodejs/build#2540

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. install Issues and PRs related to the installers. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform. labels Dec 22, 2022
@lpinca
Copy link
Member

lpinca commented Dec 24, 2022

@nodejs/platform-windows

@pbo-linaro
Copy link
Contributor

@StefanStojanovic We can help with testing on this. Do you have an installer to share (built from that PR) that would could try?

@StefanStojanovic
Copy link
Contributor Author

@StefanStojanovic We can help with testing on this. Do you have an installer to share (built from that PR) that would could try?

I made a release with the installer on JaneaSystems/node fork here. Anyone from @nodejs/platform-windows-arm, feel free to chip in.

@pbo-linaro
Copy link
Contributor

I tried your installer on a Windows on Arm machine, and it works great. Node is added to PATH, and is accessible from any prompt. Great work 👍

@StefanStojanovic
Copy link
Contributor Author

An update on WiX v4: release candidate 2 was released on January 20th. I've tried it and it generated the same MSI file as release candidate 1. Since there are no notable changes for the Node.js installer, this PR will keep relying on the RC1.

@StefanStojanovic StefanStojanovic force-pushed the mefi-wix-migration-wixproj branch 2 times, most recently from 5474db7 to 17cdadc Compare March 1, 2023 20:23
StefanStojanovic added a commit to JaneaSystems/build that referenced this pull request Mar 2, 2023
This is required to migrate from WiX3 to WiX4 for building the Node msi.

Refs: nodejs/node#45943
@StefanStojanovic
Copy link
Contributor Author

Just a quick update - I've made a few changes, the most important one regarding the NuGet.Config file, which makes sure nodemsi.sln is able to resolve WixToolset.SDK regardless of the NuGet configuration on the machine it's being built on. I've also tested everything in the CI and the job passed https://ci.nodejs.org/job/node-test-commit-windows-fanned/53633/

StefanStojanovic added a commit to JaneaSystems/build that referenced this pull request Mar 8, 2023
This is required to migrate from WiX3 to WiX4 for building the Node msi.

Refs: nodejs/node#45943
PR-URL: nodejs#3211
Reviewed-By: Richard Lau <[email protected]>
StefanStojanovic added a commit to nodejs/build that referenced this pull request Mar 8, 2023
This is required to migrate from WiX3 to WiX4 for building the Node msi.

Refs: nodejs/node#45943
PR-URL: #3211
Reviewed-By: Richard Lau <[email protected]>
Copy link
Member

@joaocgreis joaocgreis left a comment

Choose a reason for hiding this comment

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

I did discuss the implementation with @StefanStojanovic, but reviewed this independently and I believe this is correct.

@joaocgreis
Copy link
Member

@nodejs/tsc what is the best way of moving this forward? How can we help?

We would like to bring ARM64 Windows to tier 2 support, and this is needed to be able to build an MSI installer.

@targos
Copy link
Member

targos commented Mar 17, 2023

Let me make a test release. If that works fine, I'm ready to rubberstamp this PR.

@targos
Copy link
Member

targos commented Mar 17, 2023

https://nodejs.org/download/test/v20.0.0-test20230317e3abcc7400/

Can someone test with a Windows sandbox?

@targos
Copy link
Member

targos commented Mar 17, 2023

Is this semver-patch? Is there a risk to break upgrades from installs done with a previous MSI?

@joaocgreis
Copy link
Member

Per semver definition, this should be minor. The only visible change is to add support for ARM64 MSI, so it only adds functionality. Though the change is contained to the ARM64 Windows platform, so could it be patch?

As with any change, there is risk that there is some configuration out there where this breaks. However, this only changes the software used to build the MSI. The MSI itself should be very similar (we checked). There were no changes in the mechanism that handles upgrades. We tested the upgrade scenario and found no issues.

@targos I checked the test release and it worked well for me (upgraded from latest v19). Would be good to have other people test it as well!

@targos
Copy link
Member

targos commented Mar 17, 2023

I also just tested it myself (x64) with an upgrade from v18. Looks good!

@StefanStojanovic
Copy link
Contributor Author

StefanStojanovic commented Mar 20, 2023

@targos, since neither Joao nor I are collaborators, can you please land this?

@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/45943
✔  Done loading data for nodejs/node/pull/45943
----------------------------------- PR info ------------------------------------
Title      msi: migrate to WiX4 (#45943)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     StefanStojanovic:mefi-wix-migration-wixproj -> nodejs:main
Labels     doc, windows, install, semver-minor, build, meta, tools, needs-ci, commit-queue-squash
Commits    2
 - msi: migrate to WiX4
 - msi: fixup WiX4 migration
Committers 1
 - StefanStojanovic 
PR-URL: https://github.com/nodejs/node/pull/45943
Refs: https://github.com/nodejs/build/issues/2540
Reviewed-By: Michaël Zasso 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/45943
Refs: https://github.com/nodejs/build/issues/2540
Reviewed-By: Michaël Zasso 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last review:
   ⚠  - msi: migrate to WiX4
   ⚠  - msi: fixup WiX4 migration
   ℹ  This PR was created on Thu, 22 Dec 2022 18:05:22 GMT
   ✔  Approvals: 1
   ✔  - Michaël Zasso (@targos) (TSC): https://github.com/nodejs/node/pull/45943#pullrequestreview-1346956766
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-03-22T17:46:58Z: https://ci.nodejs.org/job/node-test-pull-request/50554/
- Querying data for job/node-test-pull-request/50554/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4494886452

@richardlau richardlau added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Mar 22, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 22, 2023
@nodejs-github-bot nodejs-github-bot merged commit 0b66df6 into nodejs:main Mar 22, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 0b66df6

StefanStojanovic added a commit to JaneaSystems/node that referenced this pull request Mar 23, 2023
StefanStojanovic added a commit to JaneaSystems/build that referenced this pull request Mar 23, 2023
StefanStojanovic added a commit to JaneaSystems/build that referenced this pull request Mar 23, 2023
StefanStojanovic added a commit to JaneaSystems/build that referenced this pull request Mar 27, 2023
Refs: nodejs/node#45943
PR-URL: nodejs#3251
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
StefanStojanovic added a commit to nodejs/build that referenced this pull request Mar 27, 2023
Refs: nodejs/node#45943
PR-URL: #3251
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Apr 5, 2023
To be able to build x86, x64, and ARM64 MSI installers with the same WiX
version, migration to WiX4 is required.

PR-URL: #45943
Refs: nodejs/build#2540
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 6, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: TBD
@RafaelGSS RafaelGSS mentioned this pull request Apr 6, 2023
RafaelGSS added a commit that referenced this pull request Apr 6, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: TBD
RafaelGSS added a commit that referenced this pull request Apr 6, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #47441
RafaelGSS added a commit that referenced this pull request Apr 6, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #47441
RafaelGSS pushed a commit that referenced this pull request Apr 7, 2023
To be able to build x86, x64, and ARM64 MSI installers with the same WiX
version, migration to WiX4 is required.

PR-URL: #45943
Refs: nodejs/build#2540
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 7, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #47441
RafaelGSS added a commit that referenced this pull request Apr 8, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179

PR-URL: #47441
RafaelGSS added a commit that referenced this pull request Apr 10, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
test_runner:
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238

PR-URL: #47441
Signed-off-by: RafaelGSS <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 11, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
test_runner:
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238

PR-URL: #47441
Signed-off-by: RafaelGSS <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 13, 2023
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
test_runner:
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238

PR-URL: #47441
Signed-off-by: RafaelGSS <[email protected]>
@danielleadams danielleadams added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. build Issues and PRs related to build files or the CI. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. install Issues and PRs related to the installers. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants