IYUUPlus-Windows/forge.config.js
2024-06-29 00:41:06 +08:00

59 lines
1.4 KiB
JavaScript

const { FusesPlugin } = require('@electron-forge/plugin-fuses');
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
module.exports = {
packagerConfig: {
asar: true,
icon: 'iyuu',
extraResource: [
'run/',
'iyuu/',
]
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
setupIcon: 'iyuu.ico',
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
config: {
icon: 'iyuu.icns',
}
},
{
name: '@electron-forge/maker-deb',
config: {
icon: 'iyuu.png',
},
},
{
name: '@electron-forge/maker-rpm',
config: {
icon: 'iyuu.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,
}),
],
};