From e3dc1101fdbb00238c84a291b074b9258f741ed6 Mon Sep 17 00:00:00 2001 From: clementou Date: Fri, 4 Jul 2025 22:21:53 -0700 Subject: [PATCH] support intel --- electron-builder.yml | 46 ++++++++++++++++++++++++++++---------------- forge.config.js | 23 +++++++++++----------- package.json | 4 ++++ 3 files changed, 45 insertions(+), 28 deletions(-) diff --git a/electron-builder.yml b/electron-builder.yml index 532f4ef..d1c1b5d 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -8,29 +8,41 @@ productName: Glass # Publish configuration for GitHub releases publish: - provider: github - owner: pickle-com - repo: glass - releaseType: draft + provider: github + owner: pickle-com + repo: glass + releaseType: draft # List of files to be included in the app package files: - - src/**/* - - package.json - - pickleglass_web/backend_node/**/* - - '!**/node_modules/electron/**' - - public/build/**/* + - src/**/* + - package.json + - pickleglass_web/backend_node/**/* + - '!**/node_modules/electron/**' + - public/build/**/* # Additional resources to be copied into the app's resources directory extraResources: - - from: src/assets/SystemAudioDump - to: SystemAudioDump - - from: pickleglass_web/out - to: out + - from: src/assets/SystemAudioDump + to: SystemAudioDump + - from: pickleglass_web/out + to: out # macOS specific configuration mac: - # The application category type - category: public.app-category.utilities - # Path to the .icns icon file - icon: src/assets/logo.icns \ No newline at end of file + # The application category type + category: public.app-category.utilities + # Path to the .icns icon file + icon: src/assets/logo.icns + # Target both Intel and Apple Silicon architectures + target: + - target: dmg + arch: + - x64 + - arm64 + - target: zip + arch: + - x64 + - arm64 + # Minimum macOS version (supports both Intel and Apple Silicon) + minimumSystemVersion: '11.0' diff --git a/forge.config.js b/forge.config.js index 4f0bd19..f60a427 100644 --- a/forge.config.js +++ b/forge.config.js @@ -5,25 +5,26 @@ const { notarizeApp } = require('./notarize'); module.exports = { packagerConfig: { asar: { - unpack: - '**/*.node,**/*.dylib,' + - '**/node_modules/{sharp,@img}/**/*' + unpack: '**/*.node,**/*.dylib,' + '**/node_modules/{sharp,@img}/**/*', }, extraResource: ['./src/assets/SystemAudioDump', './pickleglass_web/out'], name: 'Glass', icon: 'src/assets/logo', appBundleId: 'com.pickle.glass', + arch: 'universal', protocols: [ { name: 'PickleGlass Protocol', - schemes: ['pickleglass'] - } + schemes: ['pickleglass'], + }, ], asarUnpack: [ - "**/*.node", - "**/*.dylib", - "node_modules/@img/sharp-darwin-arm64/**", - "node_modules/@img/sharp-libvips-darwin-arm64/**" + '**/*.node', + '**/*.dylib', + 'node_modules/@img/sharp-darwin-x64/**', + 'node_modules/@img/sharp-libvips-darwin-x64/**', + 'node_modules/@img/sharp-darwin-arm64/**', + 'node_modules/@img/sharp-libvips-darwin-arm64/**', ], osxSign: { identity: process.env.APPLE_SIGNING_IDENTITY, @@ -35,8 +36,8 @@ module.exports = { tool: 'notarytool', appleId: process.env.APPLE_ID, appleIdPassword: process.env.APPLE_ID_PASSWORD, - teamId: process.env.APPLE_TEAM_ID - } + teamId: process.env.APPLE_TEAM_ID, + }, }, rebuildConfig: {}, makers: [ diff --git a/package.json b/package.json index b5eaa2a..9365e5d 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,9 @@ "electron-builder": "^26.0.12", "electron-reloader": "^1.2.3", "esbuild": "^0.25.5" + }, + "optionalDependencies": { + "@img/sharp-darwin-x64": "^0.34.2", + "@img/sharp-libvips-darwin-x64": "^1.1.0" } }