Mastermind/forge.config.js
Илья Глазунов 219f35cc04
Some checks failed
Build and Release / build (x64, ubuntu-latest, linux) (push) Has been skipped
Build and Release / build (arm64, macos-latest, darwin) (push) Has been cancelled
Build and Release / build (x64, macos-latest, darwin) (push) Has been cancelled
Build and Release / build (x64, windows-latest, win32) (push) Has been cancelled
Build and Release / release (push) Has been cancelled
chore: bump version to 0.7.9 and remove unused additional DMG options
2026-02-21 23:19:57 +03:00

88 lines
2.6 KiB
JavaScript

const { FusesPlugin } = require("@electron-forge/plugin-fuses");
const { FuseV1Options, FuseVersion } = require("@electron/fuses");
module.exports = {
packagerConfig: {
asar: {
unpack:
"**/{onnxruntime-node,onnxruntime-common,@huggingface/transformers,sharp,@img}/**",
},
extraResource: ["./src/assets/SystemAudioDump"],
name: "Mastermind",
icon: "src/assets/logo",
// use `security find-identity -v -p codesigning` to find your identity
// for macos signing
// also fuck apple
// osxSign: {
// identity: '<paste your identity here>',
// optionsForFile: (filePath) => {
// return {
// entitlements: 'entitlements.plist',
// };
// },
// },
// notarize if off cuz i ran this for 6 hours and it still didnt finish
// osxNotarize: {
// appleId: 'your apple id',
// appleIdPassword: 'app specific password',
// teamId: 'your team id',
// },
},
rebuildConfig: {
// Ensure onnxruntime-node is rebuilt against Electron's Node.js headers
// so the native binding matches the ABI used in packaged builds.
onlyModules: ["onnxruntime-node", "sharp"],
},
makers: [
{
name: "@electron-forge/maker-squirrel",
config: {
name: "mastermind",
productName: "Mastermind",
shortcutName: "Mastermind",
createDesktopShortcut: true,
createStartMenuShortcut: true,
},
},
{
name: "@electron-forge/maker-dmg",
platforms: ["darwin"],
config: {
format: "UDZO",
icon: "src/assets/logo.icns",
},
},
{
name: "@reforged/maker-appimage",
platforms: ["linux"],
config: {
options: {
name: "Mastermind",
productName: "Mastermind",
genericName: "AI Assistant",
description: "AI assistant for interviews and learning",
categories: ["Development", "Education"],
icon: "src/assets/logo.png",
},
},
},
],
plugins: [
{
name: "@electron-forge/plugin-auto-unpack-natives",
config: {},
},
// Fuses are used to enable/disable various Electron functionality
// at package time, before code signing the application
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],
};