-
Notifications
You must be signed in to change notification settings - Fork 8
/
forge.config.js
86 lines (86 loc) · 2.16 KB
/
forge.config.js
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
const fs = require('fs');
const packagerConfig = {
appBundleId: 'com.effectnote.desktop',
icon: './public/images/icon',
ignore: [
"^\\/src$",
"^\\/server$",
"^\\/test$",
"^\\/docs$",
"^\\/public$",
"^\\/dist$",
"^\\/[.].+",
// [...]
]
};
if (process.argv[3] === 'mas') {
packagerConfig.osxSign = {
identity: 'Apple Distribution: wenda wei (8NFNDJ5TWD)',
preEmbedProvisioningProfile: true,
provisioningProfile: '/Users/mac/Downloads/mas.provisionprofile',
optionsForFile: (filePath) => {
if (filePath.endsWith("EffectNote.app")) {
return {
entitlements: './sign/entitlements.mas.plist'
}
} else if (filePath.includes("Library/LoginItems")) {
return {
entitlements: './sign/entitlements.mas.loginhelper.plist'
};
} else {
return {
entitlements: './sign/entitlements.mas.inherit.plist'
};
}
}
}
}
if (process.argv[3] === 'darwin') {
packagerConfig.osxSign = {
identity: 'Developer ID Application: wenda wei (8NFNDJ5TWD)',
preEmbedProvisioningProfile: true,
provisioningProfile: '/Users/mac/Downloads/nomas.provisionprofile',
}
packagerConfig.osxNotarize = {
tool: 'notarytool',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD,
teamId: process.env.APPLE_TEAM_ID,
}
}
module.exports = {
hooks: {
generateAssets: async () => {
fs.writeFileSync(
'./role.json',
JSON.stringify({
role: process.env.PLATFORM
})
);
}
},
packagerConfig: packagerConfig,
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
iconUrl: 'https://fileserver-1314328063.cos.ap-beijing.myqcloud.com/icon.ico',
// The ICO file to use as the icon for the generated Setup.exe
setupIcon: './public/images/icon.ico'
},
},
{
name: '@electron-forge/maker-dmg',
config: {
format: 'ULFO',
icon: './public/images/icon.icns',
name: 'EffectNote'
}
},
{
name: '@electron-forge/maker-pkg',
config: {}
}
],
};