From a47eb847fbd5e7586019b9a796a7ed01e6912a4d Mon Sep 17 00:00:00 2001 From: Bob Tolbert Date: Tue, 31 Dec 2024 08:55:25 -0600 Subject: [PATCH] Brief: Add Arm64 .msi support on Windows Summary: Small update to add Windows on Arm64 support. Also requires the latest version 3.14 of the WiX toolset. --- README.md | 2 +- build_win.bat | 10 ++++++++-- tools/msi/janet.wxs | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7376b4335..5a37618d0 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ Alternatively, install the package directly with `pkgin install janet`. To build an `.msi` installer executable, in addition to the above steps, you will have to: -5. Install, or otherwise add to your PATH the [WiX 3.11 Toolset](https://github.com/wixtoolset/wix3/releases). +5. Install, or otherwise add to your PATH the [WiX 3.14 Toolset](https://github.com/wixtoolset/wix3/releases). 6. Run `build_win dist`. Now you should have an `.msi`. You can run `build_win install` to install the `.msi`, or execute the file itself. diff --git a/build_win.bat b/build_win.bat index a53d49314..038296674 100644 --- a/build_win.bat +++ b/build_win.bat @@ -91,7 +91,7 @@ exit /b 0 @rem Clean build artifacts :CLEAN -del *.exe *.lib *.exp +del *.exe *.lib *.exp *.msi *.wixpdb rd /s /q build if exist dist ( rd /s /q dist @@ -143,7 +143,13 @@ if defined CI ( ) else ( set WIXBIN= ) -%WIXBIN%candle.exe tools\msi\janet.wxs -arch %BUILDARCH% -out build\ + +set WIXARCH=%BUILDARCH% +if "%WIXARCH%"=="aarch64" ( + set WIXARCH=arm64 +) + +%WIXBIN%candle.exe tools\msi\janet.wxs -arch %WIXARCH% -out build\ %WIXBIN%light.exe "-sice:ICE38" -b tools\msi -ext WixUIExtension build\janet.wixobj -out janet-%RELEASE_VERSION%-windows-%BUILDARCH%-installer.msi exit /b 0 diff --git a/tools/msi/janet.wxs b/tools/msi/janet.wxs index 9ea2038d4..1d2f60d57 100644 --- a/tools/msi/janet.wxs +++ b/tools/msi/janet.wxs @@ -19,6 +19,11 @@ + + + + +