From cd1ca7edf50160214476cf02ff1f255771eb1dc8 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Thu, 13 May 2021 21:49:18 -0400 Subject: [PATCH] Add support for building arm64 dmg (Apple Silicon processors) (#157). --- README.md | 3 ++- app/assets/js/scripts/uicore.js | 2 +- electron-builder.yml | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f1b06ed..305ef9f 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,8 @@ If you download from the [Releases](https://github.com/dscalzi/HeliosLauncher/re | Platform | File | | -------- | ---- | | Windows x64 | `Helios-Launcher-setup-VERSION.exe` | -| macOS | `Helios-Launcher-setup-VERSION.dmg` | +| macOS x64 | `Helios-Launcher-setup-VERSION.dmg` | +| macOS arm64 | `Helios-Launcher-setup-VERSION-arm64.dmg` | | Linux x64 | `Helios-Launcher-setup-VERSION.AppImage` | ## Console diff --git a/app/assets/js/scripts/uicore.js b/app/assets/js/scripts/uicore.js index cdde438..7d3cddb 100644 --- a/app/assets/js/scripts/uicore.js +++ b/app/assets/js/scripts/uicore.js @@ -49,7 +49,7 @@ if(!isDev){ loggerAutoUpdaterSuccess.log('New update available', info.version) if(process.platform === 'darwin'){ - info.darwindownload = `https://github.com/dscalzi/HeliosLauncher/releases/download/v${info.version}/helioslauncher-setup-${info.version}.dmg` + info.darwindownload = `https://github.com/dscalzi/HeliosLauncher/releases/download/v${info.version}/helioslauncher-setup-${info.version}${process.arch === 'arm64' ? '-arm64' : ''}.dmg` showUpdateUI(info) } diff --git a/electron-builder.yml b/electron-builder.yml index 08175af..1b58454 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -28,7 +28,12 @@ nsis: # macOS Configuration mac: - target: 'dmg' + target: + - target: 'dmg' + arch: + - 'x64' + - 'arm64' + artifactName: '${productName}-setup-${version}-${arch}.${ext}' category: 'public.app-category.games' # Linux Configuration