Skip to content

Commit f252933

Browse files
authored
Merge pull request #1541 from rwtolbert/feature/win_arm64_dist
Brief: Add Arm64 .msi support on Windows
2 parents 6dbd7b4 + a47eb84 commit f252933

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Alternatively, install the package directly with `pkgin install janet`.
207207

208208
To build an `.msi` installer executable, in addition to the above steps, you will have to:
209209

210-
5. Install, or otherwise add to your PATH the [WiX 3.11 Toolset](https://github.com/wixtoolset/wix3/releases).
210+
5. Install, or otherwise add to your PATH the [WiX 3.14 Toolset](https://github.com/wixtoolset/wix3/releases).
211211
6. Run `build_win dist`.
212212

213213
Now you should have an `.msi`. You can run `build_win install` to install the `.msi`, or execute the file itself.

build_win.bat

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ exit /b 0
9191

9292
@rem Clean build artifacts
9393
:CLEAN
94-
del *.exe *.lib *.exp
94+
del *.exe *.lib *.exp *.msi *.wixpdb
9595
rd /s /q build
9696
if exist dist (
9797
rd /s /q dist
@@ -143,7 +143,13 @@ if defined CI (
143143
) else (
144144
set WIXBIN=
145145
)
146-
%WIXBIN%candle.exe tools\msi\janet.wxs -arch %BUILDARCH% -out build\
146+
147+
set WIXARCH=%BUILDARCH%
148+
if "%WIXARCH%"=="aarch64" (
149+
set WIXARCH=arm64
150+
)
151+
152+
%WIXBIN%candle.exe tools\msi\janet.wxs -arch %WIXARCH% -out build\
147153
%WIXBIN%light.exe "-sice:ICE38" -b tools\msi -ext WixUIExtension build\janet.wixobj -out janet-%RELEASE_VERSION%-windows-%BUILDARCH%-installer.msi
148154
exit /b 0
149155

tools/msi/janet.wxs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
2020
<?define Win64="no" ?>
2121
<?define Arch="(x86)" ?>
22+
<?elseif $(sys.BUILDARCH)="arm64" ?>
23+
<?define UpgradeCode="0bd4bab6-c838-4c2a-b9e6-56ea8064863c" ?>
24+
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
25+
<?define Win64="yes" ?>
26+
<?define Arch="(Arm)" ?>
2227
<?else ?>
2328
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
2429
<?endif?>

0 commit comments

Comments
 (0)