Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,43 @@ jobs:
name: windows-zip
path: target/release/volta-windows.zip

windows-arm:
name: Build - Windows ARM
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up cargo
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: aarch64-pc-windows-msvc
- name: Add cargo-wix subcommand
run: cargo install cargo-wix
- name: Compile and package installer
run: |
cargo wix --nocapture --package volta --target aarch64-pc-windows-msvc --output target\wix\volta-windows-arm.msi
- name: Create zip of binaries
run: powershell Compress-Archive volta*.exe volta-windows-arm.zip
working-directory: ./target/aarch64-pc-windows-msvc/release
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: windows-installer-arm
path: target/wix/volta-windows-arm.msi
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: windows-zip-arm
path: target/aarch64-pc-windows-msvc/release/volta-windows-arm.zip

release:
name: Publish release
runs-on: ubuntu-latest
needs:
- linux
- macos
- windows
- windows-arm
if: github.event_name == 'push'
steps:
- name: Check out code
Expand Down Expand Up @@ -141,6 +171,16 @@ jobs:
with:
name: windows-zip
path: release
- name: Fetch Windows ARM installer
uses: actions/download-artifact@v4
with:
name: windows-installer-arm
path: release
- name: Fetch Windows ARM zip
uses: actions/download-artifact@v4
with:
name: windows-zip-arm
path: release
- name: Show release artifacts
run: ls -la release
- name: Create draft release
Expand Down Expand Up @@ -197,6 +237,24 @@ jobs:
asset_path: ./release/volta-windows.zip
asset_name: volta-${{ steps.release_info.outputs.version }}-windows.zip
asset_content_type: application/zip
- name: Upload Windows ARM installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/volta-windows-arm.msi
asset_name: volta-${{ steps.release_info.outputs.version }}-windows-arm64.msi
asset_content_type: application/x-msi
- name: Upload Windows ARM zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/volta-windows-arm.zip
asset_name: volta-${{ steps.release_info.outputs.version }}-windows-arm64.zip
asset_content_type: application/zip
- name: Upload manifest file
uses: actions/upload-release-asset@v1
env:
Expand Down
59 changes: 30 additions & 29 deletions wix/main.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
destination for 32-bit versus 64-bit installers. Removal of these lines will
cause installation errors.
-->
<?if $(var.Platform) = x64 ?>
<?define Win64 = "yes" ?>
<?if $(sys.BUILDARCH) = x64 or $(sys.BUILDARCH) = arm64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define Win64 = "no" ?>
Comment on lines -24 to -28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the Win64 changes here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Win64 and Platform settings have been removed as they are now deprecated in wix. The details are described in the following pull request from cargo-wix, which is shared here.

volks73/cargo-wix#113 (comment)

I took the opportunity to remove use of Win64 and Platform in the wxs: those attributes are deprecated according to the wix documentation, passing -arch on the command line should be prefered (which this PR now does). var.Platform is replaced by sys.BUILDARCH.

<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>

Expand All @@ -44,12 +42,11 @@
Keywords='Installer'
Description='The JavaScript Launcher'
Manufacturer='The Volta Maintainers'
InstallerVersion='450'
InstallerVersion='500'
Languages='1033'
Compressed='yes'
InstallScope='perMachine'
SummaryCodepage='1252'
Platform='$(var.Platform)'/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you dropping the Platform value here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am deleting it for the same reason as here: #1801 (comment)

SummaryCodepage='1252'/>

<MajorUpgrade
Schedule='afterInstallInitialize'
Expand All @@ -62,16 +59,18 @@
<Directory Id='INSTALLDIR' Name='Volta'>
</Directory>
</Directory>
<?if $(sys.BUILDARCH) = x64 ?>
<Merge Id='VCRedist' SourceFile='wix\Microsoft_VC140_CRT_x64.msm' DiskId='1' Language='0'/>
<?endif ?>
Comment on lines +62 to +64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you dropping this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the VC++ redistribution runtime was only available for x64, I have added a condition so that it is only included for x64 as before.

</Directory>

<ComponentGroup Id='Binaries' Directory='INSTALLDIR'>
<Component Id='voltaBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='voltaBinary' Guid='*'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and throughout, why are you removing Win64=?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am deleting it for the same reason as here: #1801 (comment)

<File
Id='voltaEXE'
Name='volta.exe'
DiskId='1'
Source='target\release\volta.exe'
Source='$(var.CargoTargetBinDir)\volta.exe'
KeyPath='yes'/>
<Environment
Id='INSTALLPATH'
Expand All @@ -82,103 +81,103 @@
Action='set'
System='yes' />
</Component>
<Component Id='shimBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='shimBinary' Guid='*'>
<File
Id='voltashimEXE'
Name='volta-shim.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='migrateBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='migrateBinary' Guid='*'>
<File
Id='voltamigrateEXE'
Name='volta-migrate.exe'
DiskId='1'
Source='target\release\volta-migrate.exe'
Source='$(var.CargoTargetBinDir)\volta-migrate.exe'
KeyPath='yes'/>
</Component>
<Component Id='nodeBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='nodeBinary' Guid='*'>
<File
Id='nodeEXE'
Name='node.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='npmBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='npmBinary' Guid='*'>
<File
Id='npmEXE'
Name='npm.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='npmScript' Guid='*' Win64='$(var.Win64)'>
<Component Id='npmScript' Guid='*'>
<File
Id='npmCMD'
Name='npm.cmd'
DiskId='1'
Source='wix\shim.cmd'
KeyPath='yes'/>
</Component>
<Component Id='npxBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='npxBinary' Guid='*'>
<File
Id='npxEXE'
Name='npx.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='npxScript' Guid='*' Win64='$(var.Win64)'>
<Component Id='npxScript' Guid='*'>
<File
Id='npxCMD'
Name='npx.cmd'
DiskId='1'
Source='wix\shim.cmd'
KeyPath='yes'/>
</Component>
<Component Id='pnpmBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='pnpmBinary' Guid='*'>
<File
Id='pnpmEXE'
Name='pnpm.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='pnpmScript' Guid='*' Win64='$(var.Win64)'>
<Component Id='pnpmScript' Guid='*'>
<File
Id='pnpmCMD'
Name='pnpm.cmd'
DiskId='1'
Source='wix\shim.cmd'
KeyPath='yes'/>
</Component>
<Component Id='yarnBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='yarnBinary' Guid='*'>
<File
Id='yarnEXE'
Name='yarn.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='yarnScript' Guid='*' Win64='$(var.Win64)'>
<Component Id='yarnScript' Guid='*'>
<File
Id='yarnCMD'
Name='yarn.cmd'
DiskId='1'
Source='wix\shim.cmd'
KeyPath='yes'/>
</Component>
<Component Id='yarnPkgBinary' Guid='*' Win64='$(var.Win64)'>
<Component Id='yarnPkgBinary' Guid='*'>
<File
Id='yarnpgkEXE'
Name='yarnpkg.exe'
DiskId='1'
Source='target\release\volta-shim.exe'
Source='$(var.CargoTargetBinDir)\volta-shim.exe'
KeyPath='yes'/>
</Component>
<Component Id='yarnPkgScript' Guid='*' Win64='$(var.Win64)'>
<Component Id='yarnPkgScript' Guid='*'>
<File
Id='yarnpkgCMD'
Name='yarnpkg.cmd'
Expand All @@ -192,9 +191,11 @@
<ComponentGroupRef Id='Binaries'/>
</Feature>

<?if $(sys.BUILDARCH) = x64 ?>
<Feature Id='VCRedistributable' Title='Visual C++ Runtime' AllowAdvertise='no' Display='hidden' Level='1'>
<MergeRef Id='VCRedist'/>
</Feature>
<?endif ?>
Comment on lines +194 to +198
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, why the addition of the BUILDARCH check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a condition that the VC++ redistribution runtime should not be included on arm64 since it was included for x64.

However, I do not know why the redistribution runtime is included. In my opinion, it seems unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like that was added in #592, as it's needed to actually run Volta and not always available on the system.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it because I couldn't find a merge module for Arm64, and it seems that it is now deprecated.

Merge modules (.msm files) for Visual C++ Redistributable files are deprecated. We don't recommend you use them for application deployment. Instead, we recommend central deployment of the Visual C++ Redistributable package.

https://learn.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170#install-the-redistributable-merge-modules


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

Expand Down