-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathforge.config.js
More file actions
87 lines (82 loc) · 1.82 KB
/
forge.config.js
File metadata and controls
87 lines (82 loc) · 1.82 KB
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
const path = require('path');
// 获取环境变量中指定的架构,如果没有则使用默认值
const targetArch = process.env.ELECTRON_ARCH || 'all';
// 根据目标架构确定打包配置
const getArchConfig = () => {
if (targetArch === 'all') {
return {
arch: ['x64', 'arm64'],
universal: true
};
}
return {
arch: [targetArch],
universal: false
};
};
const archConfig = getArchConfig();
module.exports = {
packagerConfig: {
asar: true,
icon: './assets/icon',
appBundleId: 'moe.mxd.Electron-AudioStation',
appCopyright: 'milkfish',
appCategoryType: 'public.app-category.music',
osxSign: {},
arch: archConfig.arch,
universal: archConfig.universal,
protocols: [
{
name: 'Electron AudioStation',
schemes: ['electron-audiostation']
}
],
ignore: [
/^\/\.git/,
/^\/\.github/,
/^\/out/
]
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
name: 'Electron_AudioStation',
setupIcon: path.join(__dirname, 'assets', 'icon.ico')
}
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
icon: path.join(__dirname, 'assets', 'icon.png'),
categories: ['Audio', 'Music']
}
}
},
{
name: '@electron-forge/maker-rpm',
config: {
options: {
icon: path.join(__dirname, 'assets', 'icon.png'),
categories: ['Audio', 'Music']
}
}
},
{
name: '@electron-forge/maker-dmg',
config: {
format: 'ULFO',
icon: './assets/icon.icns',
background: './assets/dmg-background.png'
}
}
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {}
}
]
};