Skip to content

Commit

Permalink
Merge pull request #1541 from rwtolbert/feature/win_arm64_dist
Browse files Browse the repository at this point in the history
Brief: Add Arm64 .msi support on Windows
  • Loading branch information
bakpakin authored Jan 1, 2025
2 parents 6dbd7b4 + a47eb84 commit f252933
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 8 additions & 2 deletions build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions tools/msi/janet.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
<?define Win64="no" ?>
<?define Arch="(x86)" ?>
<?elseif $(sys.BUILDARCH)="arm64" ?>
<?define UpgradeCode="0bd4bab6-c838-4c2a-b9e6-56ea8064863c" ?>
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
<?define Win64="yes" ?>
<?define Arch="(Arm)" ?>
<?else ?>
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
<?endif?>
Expand Down

0 comments on commit f252933

Please sign in to comment.