-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.js
37 lines (36 loc) · 792 Bytes
/
build.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
import builder from 'electron-builder';
const Platform = builder.Platform;
builder.build({
targets: Platform.WINDOWS.createTarget('msi'),
config: {
appId: 'lol.adib.tuya-smart-taskbar',
productName: 'Tuya Smart Taskbar',
directories: {
output: 'dist',
},
files: [
'main.js',
'html/**/*',
'assets/**/*',
],
win: {
target: ['msi'],
icon: 'assets/icon.ico',
artifactName: '${productName}-${version}-setup.${ext}',
},
msi: {
oneClick: false,
createDesktopShortcut: true,
createStartMenuShortcut: true,
},
extraResources: {
from: 'assets/',
to: 'resources/assets'
},
compression: 'maximum',
}
}).then(() => {
console.log('Build complete!');
}).catch((error) => {
console.error('Error during build:', error.message || error);
});