/
forge.config.js
66 lines (65 loc) · 2.01 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
(function(module) {
const path = require('path');
var fs = require('fs-extra');
const filesToDelete = [
'.compilerc',
'.gitignore',
'forge.config.js',
'build'
];
module.exports = {
'make_targets': {
'win32': [
'zip'
],
'darwin': [
'dmg'
]
},
'electronPackagerConfig': {
"icon": "src/image/app",
"asar": true,
"win32metadata": {
"CompanyName": "kimorkim",
"FileDescription": "Markdown Editor",
"OriginalFilename": "onPress.exe",
"ProductName": "onPress",
"InternalName": "onPress"
},
afterCopy: [
(buildPath, electronVersion, platform, arch, callback) => {
filesToDelete.forEach((filePath) => {
fs.remove(path.join(buildPath, filePath))
});
callback();
}
]
},
"electronWinstallerConfig": {
"name": "onPress",
"exe": "onPress.exe",
"authors": "kimorkim",
"iconUrl": "https://raw.githubusercontent.com/kimorkim/onPress/master/src/image/app.ico",
"setupIcon": "./src/image/app.ico",
"loadingGif": "./src/image/onPress.gif"
},
'electronInstallerDMG': {
'name': 'onPress',
'title': 'onPress',
'contents': [{
'x': 460,
'y': 180,
'type': 'link',
'path': '/Applications'
}, {
'x': 140,
'y': 180,
'type': 'file',
'path': path.resolve(__dirname, 'out', 'onPress-darwin-x64', 'onPress.app'),
}],
'icon': './src/image/app.icns',
'background': './src/image/background.png',
'icon-size': 120
}
};
}(module));