Skip to content

Commit 57eef0a

Browse files
committed
Support Windows Arm64 Build
1 parent 23de6ea commit 57eef0a

File tree

2 files changed

+94
-34
lines changed

2 files changed

+94
-34
lines changed

.github/workflows/release.yml

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,44 @@ jobs:
100100
name: windows-zip
101101
path: target/release/volta-windows.zip
102102

103+
windows-arm:
104+
name: Build - Windows ARM
105+
runs-on: windows-latest
106+
steps:
107+
- name: Check out code
108+
uses: actions/checkout@v4
109+
- name: Set up cargo
110+
uses: actions-rust-lang/setup-rust-toolchain@v1
111+
with:
112+
target: aarch64-pc-windows-msvc
113+
- name: Add cargo-wix subcommand
114+
run: cargo install cargo-wix
115+
- name: Compile and package installer
116+
run: |
117+
cargo wix --nocapture --package volta --target aarch64-pc-windows-msvc --output target\wix\volta-windows-arm.msi
118+
- name: Create zip of binaries
119+
run: powershell Compress-Archive volta*.exe volta-windows-arm.zip
120+
working-directory: ./target/aarch64-pc-windows-msvc/release
121+
- name: Upload installer
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: windows-installer-arm
125+
path: target/wix/volta-windows-arm.msi
126+
- name: Upload zip
127+
uses: actions/upload-artifact@v4
128+
with:
129+
name: windows-zip-arm
130+
path: target/aarch64-pc-windows-msvc/release/volta-windows-arm.zip
131+
103132
release:
104133
name: Publish release
105134
runs-on: ubuntu-latest
106135
needs:
107136
- linux
137+
- linux-arm
108138
- macos
109139
- windows
140+
- windows-arm
110141
if: github.event_name == 'push'
111142
steps:
112143
- name: Check out code
@@ -117,30 +148,40 @@ jobs:
117148
TAG: ${{ github.ref }}
118149
run: echo "version=${TAG:11}" >> $GITHUB_OUTPUT
119150
- name: Fetch Linux artifact
120-
uses: actions/download-artifact@v2
151+
uses: actions/download-artifact@v4
121152
with:
122153
name: linux
123154
path: release
124155
- name: Fetch Linux ARM artifact
125-
uses: actions/download-artifact@v2
156+
uses: actions/download-artifact@v4
126157
with:
127158
name: linux-arm
128159
path: release
129160
- name: Fetch MacOS artifact
130-
uses: actions/download-artifact@v2
161+
uses: actions/download-artifact@v4
131162
with:
132163
name: macos
133164
path: release
134165
- name: Fetch Windows installer
135-
uses: actions/download-artifact@v2
166+
uses: actions/download-artifact@v4
136167
with:
137168
name: windows-installer
138169
path: release
139170
- name: Fetch Windows zip
140-
uses: actions/download-artifact@v2
171+
uses: actions/download-artifact@v4
141172
with:
142173
name: windows-zip
143174
path: release
175+
- name: Fetch Windows ARM installer
176+
uses: actions/download-artifact@v4
177+
with:
178+
name: windows-installer-arm
179+
path: release
180+
- name: Fetch Windows ARM zip
181+
uses: actions/download-artifact@v4
182+
with:
183+
name: windows-zip-arm
184+
path: release
144185
- name: Show release artifacts
145186
run: ls -la release
146187
- name: Create draft release
@@ -197,6 +238,24 @@ jobs:
197238
asset_path: ./release/volta-windows.zip
198239
asset_name: volta-${{ steps.release_info.outputs.version }}-windows.zip
199240
asset_content_type: application/zip
241+
- name: Upload Windows ARM installer
242+
uses: actions/upload-release-asset@v1
243+
env:
244+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245+
with:
246+
upload_url: ${{ steps.create_release.outputs.upload_url }}
247+
asset_path: ./release/volta-windows-arm.msi
248+
asset_name: volta-${{ steps.release_info.outputs.version }}-windows-arm64.msi
249+
asset_content_type: application/x-msi
250+
- name: Upload Windows ARM zip
251+
uses: actions/upload-release-asset@v1
252+
env:
253+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
254+
with:
255+
upload_url: ${{ steps.create_release.outputs.upload_url }}
256+
asset_path: ./release/volta-windows-arm.zip
257+
asset_name: volta-${{ steps.release_info.outputs.version }}-windows-arm64.zip
258+
asset_content_type: application/zip
200259
- name: Upload manifest file
201260
uses: actions/upload-release-asset@v1
202261
env:

wix/main.wxs

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121
destination for 32-bit versus 64-bit installers. Removal of these lines will
2222
cause installation errors.
2323
-->
24-
<?if $(var.Platform) = x64 ?>
25-
<?define Win64 = "yes" ?>
24+
<?if $(sys.BUILDARCH) = x64 or $(sys.BUILDARCH) = arm64 ?>
2625
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
2726
<?else ?>
28-
<?define Win64 = "no" ?>
2927
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
3028
<?endif ?>
3129

@@ -44,12 +42,11 @@
4442
Keywords='Installer'
4543
Description='The JavaScript Launcher'
4644
Manufacturer='The Volta Maintainers'
47-
InstallerVersion='450'
45+
InstallerVersion='500'
4846
Languages='1033'
4947
Compressed='yes'
5048
InstallScope='perMachine'
51-
SummaryCodepage='1252'
52-
Platform='$(var.Platform)'/>
49+
SummaryCodepage='1252'/>
5350

5451
<MajorUpgrade
5552
Schedule='afterInstallInitialize'
@@ -62,16 +59,18 @@
6259
<Directory Id='INSTALLDIR' Name='Volta'>
6360
</Directory>
6461
</Directory>
62+
<?if $(sys.BUILDARCH) = x64 ?>
6563
<Merge Id='VCRedist' SourceFile='wix\Microsoft_VC140_CRT_x64.msm' DiskId='1' Language='0'/>
64+
<?endif ?>
6665
</Directory>
6766

6867
<ComponentGroup Id='Binaries' Directory='INSTALLDIR'>
69-
<Component Id='voltaBinary' Guid='*' Win64='$(var.Win64)'>
68+
<Component Id='voltaBinary' Guid='*'>
7069
<File
7170
Id='voltaEXE'
7271
Name='volta.exe'
7372
DiskId='1'
74-
Source='target\release\volta.exe'
73+
Source='$(var.CargoTargetBinDir)\volta.exe'
7574
KeyPath='yes'/>
7675
<Environment
7776
Id='INSTALLPATH'
@@ -82,103 +81,103 @@
8281
Action='set'
8382
System='yes' />
8483
</Component>
85-
<Component Id='shimBinary' Guid='*' Win64='$(var.Win64)'>
84+
<Component Id='shimBinary' Guid='*'>
8685
<File
8786
Id='voltashimEXE'
8887
Name='volta-shim.exe'
8988
DiskId='1'
90-
Source='target\release\volta-shim.exe'
89+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
9190
KeyPath='yes'/>
9291
</Component>
93-
<Component Id='migrateBinary' Guid='*' Win64='$(var.Win64)'>
92+
<Component Id='migrateBinary' Guid='*'>
9493
<File
9594
Id='voltamigrateEXE'
9695
Name='volta-migrate.exe'
9796
DiskId='1'
98-
Source='target\release\volta-migrate.exe'
97+
Source='$(var.CargoTargetBinDir)\volta-migrate.exe'
9998
KeyPath='yes'/>
10099
</Component>
101-
<Component Id='nodeBinary' Guid='*' Win64='$(var.Win64)'>
100+
<Component Id='nodeBinary' Guid='*'>
102101
<File
103102
Id='nodeEXE'
104103
Name='node.exe'
105104
DiskId='1'
106-
Source='target\release\volta-shim.exe'
105+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
107106
KeyPath='yes'/>
108107
</Component>
109-
<Component Id='npmBinary' Guid='*' Win64='$(var.Win64)'>
108+
<Component Id='npmBinary' Guid='*'>
110109
<File
111110
Id='npmEXE'
112111
Name='npm.exe'
113112
DiskId='1'
114-
Source='target\release\volta-shim.exe'
113+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
115114
KeyPath='yes'/>
116115
</Component>
117-
<Component Id='npmScript' Guid='*' Win64='$(var.Win64)'>
116+
<Component Id='npmScript' Guid='*'>
118117
<File
119118
Id='npmCMD'
120119
Name='npm.cmd'
121120
DiskId='1'
122121
Source='wix\shim.cmd'
123122
KeyPath='yes'/>
124123
</Component>
125-
<Component Id='npxBinary' Guid='*' Win64='$(var.Win64)'>
124+
<Component Id='npxBinary' Guid='*'>
126125
<File
127126
Id='npxEXE'
128127
Name='npx.exe'
129128
DiskId='1'
130-
Source='target\release\volta-shim.exe'
129+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
131130
KeyPath='yes'/>
132131
</Component>
133-
<Component Id='npxScript' Guid='*' Win64='$(var.Win64)'>
132+
<Component Id='npxScript' Guid='*'>
134133
<File
135134
Id='npxCMD'
136135
Name='npx.cmd'
137136
DiskId='1'
138137
Source='wix\shim.cmd'
139138
KeyPath='yes'/>
140139
</Component>
141-
<Component Id='pnpmBinary' Guid='*' Win64='$(var.Win64)'>
140+
<Component Id='pnpmBinary' Guid='*'>
142141
<File
143142
Id='pnpmEXE'
144143
Name='pnpm.exe'
145144
DiskId='1'
146-
Source='target\release\volta-shim.exe'
145+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
147146
KeyPath='yes'/>
148147
</Component>
149-
<Component Id='pnpmScript' Guid='*' Win64='$(var.Win64)'>
148+
<Component Id='pnpmScript' Guid='*'>
150149
<File
151150
Id='pnpmCMD'
152151
Name='pnpm.cmd'
153152
DiskId='1'
154153
Source='wix\shim.cmd'
155154
KeyPath='yes'/>
156155
</Component>
157-
<Component Id='yarnBinary' Guid='*' Win64='$(var.Win64)'>
156+
<Component Id='yarnBinary' Guid='*'>
158157
<File
159158
Id='yarnEXE'
160159
Name='yarn.exe'
161160
DiskId='1'
162-
Source='target\release\volta-shim.exe'
161+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
163162
KeyPath='yes'/>
164163
</Component>
165-
<Component Id='yarnScript' Guid='*' Win64='$(var.Win64)'>
164+
<Component Id='yarnScript' Guid='*'>
166165
<File
167166
Id='yarnCMD'
168167
Name='yarn.cmd'
169168
DiskId='1'
170169
Source='wix\shim.cmd'
171170
KeyPath='yes'/>
172171
</Component>
173-
<Component Id='yarnPkgBinary' Guid='*' Win64='$(var.Win64)'>
172+
<Component Id='yarnPkgBinary' Guid='*'>
174173
<File
175174
Id='yarnpgkEXE'
176175
Name='yarnpkg.exe'
177176
DiskId='1'
178-
Source='target\release\volta-shim.exe'
177+
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
179178
KeyPath='yes'/>
180179
</Component>
181-
<Component Id='yarnPkgScript' Guid='*' Win64='$(var.Win64)'>
180+
<Component Id='yarnPkgScript' Guid='*'>
182181
<File
183182
Id='yarnpkgCMD'
184183
Name='yarnpkg.cmd'
@@ -192,9 +191,11 @@
192191
<ComponentGroupRef Id='Binaries'/>
193192
</Feature>
194193

194+
<?if $(sys.BUILDARCH) = x64 ?>
195195
<Feature Id='VCRedistributable' Title='Visual C++ Runtime' AllowAdvertise='no' Display='hidden' Level='1'>
196196
<MergeRef Id='VCRedist'/>
197197
</Feature>
198+
<?endif ?>
198199

199200
<SetProperty Id='ARPINSTALLLOCATION' Value='[APPLICATIONFOLDER]' After='CostFinalize'/>
200201

0 commit comments

Comments
 (0)