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

win,msi: use x64 node executable when cross-compiling for arm64 #34009

Closed

Conversation

dennisameling
Copy link
Contributor

@dennisameling dennisameling commented Jun 22, 2020

Builds further on #33689

The last step to successfully create MSI installers for arm64 on a x64 host is to run the license2rtf script on the x64 host using a x64 Node executable. Based on @joaocgreis's comment in #33689 (review) I came up with some logic in vcbuild.bat which downloads the latest x64 Node executable if it's not present on the machine yet.

A variable called %x64_node_exe% can be passed by your CI pipeline so that the build machines don't have to download the x64 executable all the time.

IMPORTANT: when building an MSI for ARM64, WIX 3.14 or higher is required, as that version includes support for ARM64.

How to test

  • Run vcbuild.bat release msi arm64

Before applying this PR, the process fails with Failed to generate license.rtf (because the generated node.exe is for the arm64 architecture and therefore can't run on the x64 host).

After applying this PR, the process finishes successfully.

Refs: #25998
Refs: #32582

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@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. meta Issues and PRs related to the general management of the project. windows Issues and PRs related to the Windows platform. labels Jun 22, 2020
@dennisameling dennisameling changed the title Use x64 node executable when cross-compiling for arm64 win,msi: use x64 node executable when cross-compiling for arm64 Jun 22, 2020
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.

@dennisameling again, thanks for pushing this forward!

The general approach looks good, but there are some things that need to change before this can land.

vcbuild.bat Outdated Show resolved Hide resolved
vcbuild.bat Outdated Show resolved Hide resolved
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: nodejs#25998
Refs: nodejs#32582
Updates the build instructions for Windows 10 ARM64, now that cross-compiling on a x64 host is possible.

Refs: nodejs#25998
Refs: nodejs#32582
@dennisameling
Copy link
Contributor Author

@joaocgreis Apologies for the late reply. I've applied your suggestions, so we should be good to go now for this PR 😊

@nodejs-github-bot
Copy link
Collaborator

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.

@dennisameling again, thanks for pushing this forward!

BUILDING.md Outdated Show resolved Hide resolved
vcbuild.bat Outdated Show resolved Hide resolved
Co-authored-by: João Reis <reis@janeasystems.com>
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 11, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 11, 2020
@nodejs-github-bot
Copy link
Collaborator

@richard-townsend-arm
Copy link
Contributor

richard-townsend-arm commented Aug 17, 2020

(Edit: commented in the wrong tab).

joaocgreis pushed a commit that referenced this pull request Aug 19, 2020
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: #25998
Refs: #32582
PR-URL: #34009
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
@joaocgreis
Copy link
Member

Landed in 03293aa

Thanks @dennisameling!

@joaocgreis joaocgreis closed this Aug 19, 2020
@dennisameling dennisameling deleted the vcbuild-windows-arm branch August 20, 2020 09:12
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: #25998
Refs: #32582
PR-URL: #34009
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
@danielleadams danielleadams mentioned this pull request Aug 20, 2020
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: #25998
Refs: #32582
PR-URL: #34009
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants