Skip to content

(firefox) Add native ARM64 (win64-aarch64) support#2796

Merged
flcdrg merged 1 commit into
chocolatey-community:masterfrom
dennisameling:firefox-arm64
Jul 5, 2026
Merged

(firefox) Add native ARM64 (win64-aarch64) support#2796
flcdrg merged 1 commit into
chocolatey-community:masterfrom
dennisameling:firefox-arm64

Conversation

@dennisameling

Copy link
Copy Markdown
Contributor

Description

Detect the native OS architecture at install time and pick the matching Mozilla build via an architecture -> build map (x86/x64/arm64), so Windows on ARM installs the native win64-aarch64 build instead of the emulated x64 one.

  • tools/chocolateyInstall.ps1: declare a per-package $builds map of architecture -> @{ Url; Checksum } and resolve the build via a shared Get-MozillaBuild helper. Resolution honors --forcex86 first, then the native arch from Chocolatey's Get-OSArchitecture (correct even under x64 emulation), falling back to x64 on older Chocolatey or when no arm64 checksum exists.
  • tools/helpers.ps1 (shared with Thunderbird): GetChecksums also returns the win64-aarch64 checksum (patterns anchored so 64 and 64-aarch64 rows can't cross-match); add the shared Get-MozillaBuild architecture resolver.
  • update_helper.ps1 (shared with Thunderbird): capture win64-aarch64 checksums from Mozilla SHA512SUMS, version each URL by its os= token, and add a shared GetMozillaUrlFormats emitting the x86/x64/arm64 URL formats.
  • update.ps1: pass Win64Arm64Format through both streams.
  • tools/LanguageChecksums.csv: add the win64-aarch64 checksum rows.

Verified installing the native arm64 build on Windows on ARM.

Motivation and Context

Companion PR to chocolatey/choco#3907 which aims to add native Windows arm64 support to Chocolatey.

How Has this Been Tested?

With a local build of a native arm64 choco.exe, I ran this command which resulted in a successful Firefox arm64 installation:

> choco install firefox -s "C:\repos\chocolatey-packages\automatic\firefox" -f -y --allow-unofficial
Chocolatey v2.8.0-windowsarm-20260607-e3472f8a

Chocolatey is not an official build (bypassed with --allow-unofficial).
 If you are seeing this message and it is not expected, your system may
 now be in a bad state. Only official builds are to be trusted.

Installing the following packages:
firefox
By installing, you accept licenses for the packages.
Firefox v151.0.3 already installed. Forcing reinstall of version '151.0.3'.
 Please use upgrade if you meant to upgrade to a new version.
Downloading package from source 'C:\repos\chocolatey-packages\automatic\firefox'

Firefox v151.0.3 (forced)
Firefox package files install completed. Performing other installation steps.
Using locale 'en-US'...
Downloading Firefox
  from 'https://download.mozilla.org/?product=firefox-151.0.3-ssl&os=win64-aarch64&lang=en-US'
Progress: 100% - Completed download of C:\Users\dennisameling\AppData\Local\Temp\chocolatey\Firefox\151.0.3\Firefox Setup 151.0.3.exe (77.44 MB).
Download of Firefox Setup 151.0.3.exe (77.44 MB) completed.
Hashes match.
Installing Firefox...
Firefox has been installed.
WARNING: No registry key found based on  'Mozilla Firefox'
 The install of Firefox was successful.
  Deployed to 'C:\Program Files\Mozilla Firefox'

Chocolatey installed 1/1 packages.
 See the log for details (C:\repos\choco\src\chocolatey.console\bin\Release\net48\logs\chocolatey.log).

Screenshot (if appropriate, usually isn't needed):

afbeelding

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Migrated package (a package has been migrated from another repository)

Checklist:

  • My pull request is not coming from the master branch.
  • My code follows the code style of this repository.
  • My change requires a change to documentation (this usually means the notes in the description of a package).
  • I have updated the documentation accordingly (this usually means the notes in the description of a package).
  • I have updated the package description and it is less than 4000 characters.
  • All files are up to date with the latest Contributing Guidelines
  • The added/modified package passed install/uninstall in the Chocolatey Test Environment. Note that we don't support the use of any other environment.
  • The changes only affect a single package (not including meta package).

flcdrg
flcdrg previously approved these changes Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Firefox Chocolatey package to install the correct Mozilla Windows build based on the machine’s native OS architecture, enabling native Windows ARM64 (win64-aarch64) installs instead of falling back to x64 emulation.

Changes:

  • Add an architecture→build map (x86/x64/arm64) and select the correct installer at install time via a shared Get-MozillaBuild helper.
  • Extend the automatic update tooling to generate and propagate win64-aarch64 URL formats and checksums.
  • Add win64-aarch64 checksum rows to LanguageChecksums.csv and harden checksum matching to avoid 64/64-aarch64 cross-matches.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
automatic/firefox/update.ps1 Plumbs Win64Arm64Format through both “latest” and “esr” streams for AU updates.
automatic/firefox/update_helper.ps1 Adds GetMozillaUrlFormats, captures win64-aarch64 checksums, and updates URL replacement logic to be architecture-specific.
automatic/firefox/tools/LanguageChecksums.csv Adds 64-aarch64 checksum rows per locale.
automatic/firefox/tools/helpers.ps1 Updates checksum extraction to avoid cross-matching and introduces Get-MozillaBuild architecture resolver.
automatic/firefox/tools/chocolateyInstall.ps1 Uses the architecture→build map and Get-MozillaBuild to select the correct URL/checksum at install time.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@flcdrg

flcdrg commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Can you rebase and update the relevant files against the latest Firefox release?

Detect the native OS architecture at install time and pick the matching
Mozilla build via an architecture -> build map (x86/x64/arm64), so Windows on
ARM installs the native win64-aarch64 build instead of the emulated x64 one.

- tools/chocolateyInstall.ps1: declare a per-package $builds map of
  architecture -> @{ Url; Checksum } and resolve the build via a shared
  Get-MozillaBuild helper. Resolution honors --forcex86 first, then the native
  arch from Chocolatey's Get-OSArchitecture (correct even under x64 emulation),
  falling back to x64 on older Chocolatey or when no arm64 checksum exists.
- tools/helpers.ps1 (shared with Thunderbird): GetChecksums also returns the
  win64-aarch64 checksum (patterns anchored so 64 and 64-aarch64 rows can't
  cross-match); add the shared Get-MozillaBuild architecture resolver; add the
  UTF-8 BOM to match the repository convention for *.ps1 files.
- update_helper.ps1 (shared with Thunderbird): capture win64-aarch64 checksums
  from Mozilla SHA512SUMS, version each URL by its os= token, and add a shared
  GetMozillaUrlFormats emitting the x86/x64/arm64 URL formats.
- update.ps1: pass Win64Arm64Format through both streams.
- tools/LanguageChecksums.csv: add the win64-aarch64 checksum rows.

Verified installing the native arm64 build on Windows on ARM.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dennisameling

Copy link
Copy Markdown
Contributor Author

Done, thanks!

@flcdrg
flcdrg merged commit e5507a8 into chocolatey-community:master Jul 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants