forked from seven-io/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.config.js
131 lines (125 loc) · 3.83 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
const path = require('path');
const fs = require('fs');
const assert = require('assert');
const cpy = require('cpy');
const pkg = require('./package.json');
const getIconPath = (format, size = 128) => {
const iconPath = path.normalize(
path.join(__dirname, 'src', 'assets', 'img', `${size}x${size}.${format}`));
assert.ok(fs.existsSync(iconPath));
return iconPath;
};
const icons = {
ico: getIconPath('ico'),
png: getIconPath('png'),
};
const description = 'Send SMS, Text2Speech messages and more via Sms77.io.';
module.exports = {
hooks: {
async packageAfterExtract() {
await cpy( // needed or logo wont be shown in production
[path.resolve(__dirname, '.webpack/renderer/*.*')],
path.resolve(__dirname, '.webpack/renderer/main_window')
);
},
},
makers: [
{
name: '@electron-forge/maker-zip',
platforms: [
'darwin',
],
},
{
name: '@electron-forge/maker-squirrel',
config: {
description,
iconUrl: icons.ico,
name: pkg.name,
setupIcon: icons.ico,
},
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
categories: [
'Utility',
'Office'
],
description,
genericName: 'sms77io Desktop Application',
homepage: 'https://www.sms77.io/',
icon: icons.png,
maintainer: pkg.author,
name: pkg.name,
productDescription: 'Application to send SMS through the sms77io gateway.',
productName: 'sms77io Desktop Application',
section: 'mail',
version: pkg.version
}
}
},
{
name: '@electron-forge/maker-dmg',
config: {
additionalDMGOptions: {
// 'code-sign': {identifier: 'io.sms77.desktop'}, // TODO: add signing-identity
'icon-size': 256,
},
icon: getIconPath('png', 256),
iconSize: 256,
name: pkg.name,
}
},
{
name: '@electron-forge/maker-rpm',
config: {
description,
icon: icons.png,
name: pkg.name,
version: pkg.version,
}
}
],
packagerConfig: {
appCategoryType: 'public.app-category.social-networking', // MacOSX only
appCopyright: pkg.author,
icon: icons.png.replace('.png', ''), // omit file extension for auto detecting according to OS
},
plugins: [
/* TODO: add back?
[
'@electron-forge/plugin-electronegativity',
{
isSarif: true,
},
],*/
[
'@electron-forge/plugin-webpack',
{
mainConfig: './webpack.main.config.js',
renderer: {
config: './webpack.renderer.config.js',
entryPoints: [{
html: './src/index.html',
js: './src/renderer.ts',
name: 'main_window',
},],
}
}
]
],
publishers: [
{
config: {
prerelease: true,
repository: {
name: 'desktop',
owner: 'sms77io',
},
},
name: '@electron-forge/publisher-github',
},
],
};