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
98 lines
3.6 KiB
JavaScript
98 lines
3.6 KiB
JavaScript
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
|
|
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
module.exports = {
|
|
packagerConfig: {
|
|
asar: true,
|
|
extraResource: ['./src/assets/SystemAudioDump'],
|
|
name: 'Cheating Daddy',
|
|
icon: 'src/assets/logo',
|
|
// Fix executable permissions after packaging
|
|
afterCopy: [
|
|
(buildPath, electronVersion, platform, arch, callback) => {
|
|
if (platform === 'darwin') {
|
|
const systemAudioDump = path.join(buildPath, '..', 'Resources', 'SystemAudioDump');
|
|
if (fs.existsSync(systemAudioDump)) {
|
|
try {
|
|
fs.chmodSync(systemAudioDump, 0o755);
|
|
console.log('✓ Set executable permissions for SystemAudioDump');
|
|
} catch (err) {
|
|
console.error('✗ Failed to set permissions:', err.message);
|
|
}
|
|
} else {
|
|
console.warn('SystemAudioDump not found at:', systemAudioDump);
|
|
}
|
|
}
|
|
callback();
|
|
},
|
|
],
|
|
// use `security find-identity -v -p codesigning` to find your identity
|
|
// for macos signing
|
|
// Use ad-hoc signing with entitlements for local development
|
|
osxSign: {
|
|
identity: '-', // ad-hoc signing (no Apple Developer account needed)
|
|
optionsForFile: (filePath) => {
|
|
return {
|
|
entitlements: 'entitlements.plist',
|
|
};
|
|
},
|
|
},
|
|
// notarize is off - requires Apple Developer account
|
|
// osxNotarize: {
|
|
// appleId: 'your apple id',
|
|
// appleIdPassword: 'app specific password',
|
|
// teamId: 'your team id',
|
|
// },
|
|
},
|
|
rebuildConfig: {},
|
|
makers: [
|
|
{
|
|
name: '@electron-forge/maker-squirrel',
|
|
config: {
|
|
name: 'cheating-daddy',
|
|
productName: 'Cheating Daddy',
|
|
shortcutName: 'Cheating Daddy',
|
|
createDesktopShortcut: true,
|
|
createStartMenuShortcut: true,
|
|
},
|
|
},
|
|
{
|
|
name: '@electron-forge/maker-dmg',
|
|
platforms: ['darwin'],
|
|
},
|
|
{
|
|
name: '@reforged/maker-appimage',
|
|
platforms: ['linux'],
|
|
config: {
|
|
options: {
|
|
name: 'Cheating Daddy',
|
|
productName: 'Cheating Daddy',
|
|
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,
|
|
}),
|
|
],
|
|
};
|