From 9ff357714214bb821d2ac505f0a8413981638ba1 Mon Sep 17 00:00:00 2001 From: ceddybi Date: Mon, 5 Feb 2024 17:44:54 -0500 Subject: [PATCH] maker-squirrel --- forge.config.ts | 35 ++++++++++++++++++++--------------- package.json | 1 + 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/forge.config.ts b/forge.config.ts index 96e79e9..070327f 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -3,11 +3,11 @@ import 'dotenv/config'; import { AutoUnpackNativesPlugin } from '@electron-forge/plugin-auto-unpack-natives'; import type { ForgeConfig } from '@electron-forge/shared-types'; import { MakerRpm } from '@electron-forge/maker-rpm'; -import { MakerSquirrel } from '@electron-forge/maker-squirrel'; import { MakerZIP } from '@electron-forge/maker-zip'; import { WebpackPlugin } from '@electron-forge/plugin-webpack'; import { mainConfig } from './webpack.main.config'; import packageJson from './package.json'; +import path from 'path'; import { rendererConfig } from './webpack.renderer.config'; const config: ForgeConfig = { @@ -40,22 +40,27 @@ const config: ForgeConfig = { } }, rebuildConfig: {}, - makers: [new MakerSquirrel({ - iconUrl: 'https://raw.githubusercontent.com/ceddybi/AIJ/master/src/assets/icon.png', - setupIcon: './src/assets/icon.ico', - }), new MakerZIP({}, ['darwin']), new MakerRpm({}), - { - "name": "@electron-forge/maker-deb", - "config": { - "mimeType": [`x-scheme-handler/${packageJson.name}`], - options: { - maintainer: packageJson.author.name, - homepage: packageJson.homepage, - icon: './src/assets/icon.png', - categories: ['Utility'] + makers: [ + { + name: '@electron-forge/maker-squirrel', + config: { + iconUrl: 'https://raw.githubusercontent.com/ceddybi/AIJ/master/src/assets/icon.png', + setupIcon: path.join(__dirname, '/src/assets/icon.png'), + skipUpdateIcon: true, + } + }, new MakerZIP({}, ['darwin']), new MakerRpm({}), + { + "name": "@electron-forge/maker-deb", + "config": { + "mimeType": [`x-scheme-handler/${packageJson.name}`], + options: { + maintainer: packageJson.author.name, + homepage: packageJson.homepage, + icon: './src/assets/icon.png', + categories: ['Utility'] + } } } - } ], plugins: [ new AutoUnpackNativesPlugin({}), diff --git a/package.json b/package.json index 26d6d76..5ab8adb 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "publish": "electron-forge publish --arch=x64 --platform", "lint": "eslint --ext .ts,.tsx .", "darwin": "yarn package && yarn make darwin && npm run publish darwin", + "darwin:arm64": "yarn package && electron-forge make --arch=arm64 --platform darwin && electron-forge publish --arch=arm64 --platform darwin", "linux": "yarn package && yarn make linux && npm run publish linux", "win": "yarn package && yarn make win32 && npm run publish win32" },