Skip to content

Commit

Permalink
Add support for macOS universal binary #348, #362
Browse files Browse the repository at this point in the history
This commit introduces a universal binary format in the distributed MDG
files for macOS, improving support for both Apple Silicon (ARM) and
Intel (x64) architectures.

It uses `electron-builder` to package both architectures into a single
executable, ensuring the application can natively on any macOS hardware
without depending on the GitHub runners' architecture. It fixes the
issue related to prior releases that supported only the architecture of
the build environment itself, which is subject to change.

Changes:

- Update DMG distribution to include both ARM64 and x64 architectures.
- Enhance system requirements documentation to reflect support for both
  architectures.
- Modify CI/CD workflows to check desktop runtime errors for both ARM64
  and x64 versions on macOS.

Resolves:

- Issue #348: Initial request for Apple Silicon support.
- Issue #362: Correction of distribution limited to ARM64 in release
  0.13.3.

`electron-builder` support:
- electron-userland/electron-builder#5475
- electron-userland/electron-builder#5689
- electron-userland/electron-builder#5426
  • Loading branch information
undergroundwires committed May 16, 2024
1 parent 4a7efa2 commit d25c4e8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/checks.desktop-runtime-errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ jobs:
run-check:
strategy:
matrix:
os: [ macos, ubuntu, windows ]
os:
- macos-latest # Apple silicon (ARM64)
- macos-13 # Intel-based (x86-64)
- ubuntu-latest
- windows-latest
fail-fast: false # Allows to see results from other combinations
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}
steps:
-
name: Checkout
Expand All @@ -24,7 +28,7 @@ jobs:
uses: ./.github/actions/npm-install-dependencies
-
name: Configure Ubuntu
if: matrix.os == 'ubuntu'
if: contains(matrix.os, 'ubuntu') # macOS runner is missing Docker
shell: bash
run: |-
sudo apt update
Expand Down
16 changes: 6 additions & 10 deletions docs/desktop/system-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ systems or configurations that haven't undergone official testing.

- **Version:** Windows 10 and later.
- **Processor:** Intel Pentium 4 or later.
- **Architecture:** 64-bit (x64), ARM.
- **Architecture:** 64-bit (x86-64), ARM (ARM64).

> **⚠️ Compatibility Note:**
> ARM version is only compatible with Windows 11 and later.
Expand All @@ -17,24 +17,20 @@ systems or configurations that haven't undergone official testing.
## macOS

- **Version:** macOS Catalina (10.15) and later.
- **Architecture:** Intel-based (64-bit), Apple Silicon (ARM).

> **⚠️ Compatibility Note:**
> Apple Silicon version runs non-natively, leading to slower performance due to emulation [2].
- **Architecture:** Intel-based (x86-64), Apple silicon (ARM64).

## Linux

- **Version:** Ubuntu 18.04 and later, Fedora 32 and later, and Debian 10 and later.
- **Processor:** Intel Pentium 4 or later.
- **Architecture:** 64-bit (x64).
- **Architecture:** 64-bit (x86-64).

## References

System requirements reflect Electron's platform capabilities [3] and Chromium's recommended configurations [4].
System requirements reflect Electron's platform capabilities [2] and Chromium's recommended configurations [3].

For details on the build process, see [electron-builder configuration file](./../../electron-builder.cjs).

[1]: https://web.archive.org/web/20240428082726/https://learn.microsoft.com/en-us/windows/arm/add-arm-support#emulation-on-arm-based-devices-for-x86-or-x64-windows-apps "Add support Arm devices to your Windows app | Microsoft Learn | learn.microsoft.com"
[2]: https://archive.today/2024.04.28-082901/https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary%23overview "Building a universal macOS binary | Apple Developer Documentation | developer.apple.com"
[3]: https://archive.ph/2024.04.28-082958/https://github.com/electron/electron/blob/main/README.md#platform-support "Platform Support | electron/README.md at main · electron/electron · GitHub | github.com"
[4]: https://web.archive.org/web/20240428082945/https://support.google.com/chrome/a/answer/7100626?hl=en "Chrome browser system requirements - Chrome Enterprise and Education Help | support.google.com"
[2]: https://archive.ph/2024.04.28-082958/https://github.com/electron/electron/blob/main/README.md#platform-support "Platform Support | electron/README.md at main · electron/electron · GitHub | github.com"
[3]: https://web.archive.org/web/20240428082945/https://support.google.com/chrome/a/answer/7100626?hl=en "Chrome browser system requirements - Chrome Enterprise and Education Help | support.google.com"
5 changes: 4 additions & 1 deletion electron-builder.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ module.exports = {

// macOS
mac: {
target: 'dmg',
target: {
target: 'dmg',
arch: 'universal',
},
},
dmg: {
artifactName: '${name}-${version}.${ext}',
Expand Down

0 comments on commit d25c4e8

Please sign in to comment.