Skip to content

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

Open
dennisameling wants to merge 1 commit into
chocolatey-community:masterfrom
dennisameling:firefox-arm64
Open

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

Conversation

@dennisameling

Copy link
Copy Markdown

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).

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>
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.

1 participant