-
Notifications
You must be signed in to change notification settings - Fork 0
/
forge.config.ts
98 lines (94 loc) · 2.72 KB
/
forge.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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 { 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 = {
// hooks: {
// packageAfterCopy: async (forgeConfig, build_path) => {
// console.log(`\nBuild Path: ${build_path}`);
// await minify(build_path + '/src');
// },
// },
packagerConfig: {
name: packageJson.productName,
icon: './src/assets/icon',
asar: true,
protocols: [
{
"name": packageJson.productName,
"schemes": [packageJson.name]
}
],
osxSign: {
identity: process.env.SIGN_ID,
}, // object must exist even if empty
osxNotarize: {
appleId: process.env.APPLE_ID || "",
appleIdPassword: process.env.APPLE_PASSWORD || "",
teamId: process.env.APPLE_TEAM_ID || ""
// appleApiKey: process.env.APPLE_API_KEY || "",
// appleApiKeyId: process.env.APPLE_API_KEY_ID || "",
// appleApiIssuer: process.env.APPLE_API_ISSUER || ""
}
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
iconUrl: 'https://raw.githubusercontent.com/ceddybi/AIJ/master/src/assets/icon.ico',
setupIcon: path.join(__dirname, '/src/assets/icon.ico'),
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({}),
new WebpackPlugin({
mainConfig,
devContentSecurityPolicy: "default-src 'self' 'unsafe-eval' 'unsafe-inline' static: http: https: ws:",
renderer: {
config: rendererConfig,
entryPoints: [
{
name: 'main_window',
preload: {
js: './src/preload.ts',
},
},
],
},
}),
],
publishers: [
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'ceddybi',
name: 'AIJ'
},
prerelease: true
}
}
]
};
export default config;