Add support for Apple Silicon processors

I saw we can build for new Apple Sillicon processors, so here you are
This commit is contained in:
GeekCorner 2021-04-06 14:52:06 +02:00 committed by GitHub
parent 48d0c9e549
commit c04cbb5ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
const builder = require('electron-builder') const builder = require('electron-builder')
const Platform = builder.Platform const Platform = builder.Platform
function getCurrentPlatform(){ function getCurrentPlatform() {
switch(process.platform){ switch (process.platform) {
case 'win32': case 'win32':
return Platform.WINDOWS return Platform.WINDOWS
case 'darwin': case 'darwin':
@ -41,7 +41,12 @@ builder.build({
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
}, },
mac: { mac: {
target: 'dmg', target: [
{
target: 'dmg',
arch: ['x64', 'arm64']
}
],
category: 'public.app-category.games' category: 'public.app-category.games'
}, },
linux: { linux: {
@ -65,4 +70,4 @@ builder.build({
console.log('Build complete!') console.log('Build complete!')
}).catch(err => { }).catch(err => {
console.error('Error during build!', err) console.error('Error during build!', err)
}) })