Selaa lähdekoodia

Add support for building arm64 dmg (Apple Silicon processors) (#157).

Daniel Scalzi 4 vuotta sitten
vanhempi
sitoutus
cd1ca7edf5
3 muutettua tiedostoa jossa 9 lisäystä ja 3 poistoa
  1. 2 1
      README.md
  2. 1 1
      app/assets/js/scripts/uicore.js
  3. 6 1
      electron-builder.yml

+ 2 - 1
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

+ 1 - 1
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)
                 }
                 

+ 6 - 1
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