-
Notifications
You must be signed in to change notification settings - Fork 1
/
forge.config.js
83 lines (71 loc) · 2.58 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
const fse = require('fs-extra');
module.exports = {
packagerConfig: {
icon: './img/icon.ico',
appCopyright: 'Copyright (c) 2022 Ricard Lado',
},
electronRebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-flatpak',
platforms: ['linux'],
config: {
summary: 'A video vibration toolbox',
},
},
{
name: '@electron-forge/maker-squirrel',
platforms: ['windows'],
config: {
name: "ViMag",
},
},
],
publishers: [],
plugins: [],
hooks: {
generateAssets: async (forgeConfig, platform, arch) => { // Runs before start
// Linux build
if (platform === 'linux') {
}
// Windows build
if (platform === 'win32') {
}
},
prePackage: async (forgeConfig, platform, arch) => { // Runs before package
// Linux build
if (platform.platform === 'linux') {interpreter
}
// Windows build
if (platform.platform === 'win32') {
}
},
postPackage: async (forgeConfig, platform, arch) => { // Runs after package
// Linux build
if (platform.platform === 'linux') {
// Move python files to the root of the package
fse.move(
"./out/ViMag_v1.0.0/vimag-linux-x64/resources/app/python",
"./out/ViMag_v1.0.0/vimag-linux-x64/python"
);
}
// Windows build
if (platform.platform === 'win32') {
// Move python files to the root of the package
fse.moveSync(
"./out/ViMag_v1.0.0/vimag-win32-x64/resources/app/python",
"./out/ViMag_v1.0.0/vimag-win32-x64/python"
);
fse.copySync(
"./out/ViMag_v1.0.0/vimag-win32-x64/python/interpreter/externals/tcltk-8.6.12.0/amd64/lib/tcl8.6",
"./out/ViMag_v1.0.0/vimag-win32-x64/python/interpreter/PCbuild/lib/tcl8.6"
);
fse.copySync(
"./out/ViMag_v1.0.0/vimag-win32-x64/python/interpreter/externals/tcltk-8.6.12.0/amd64/lib/tk8.6",
"./out/ViMag_v1.0.0/vimag-win32-x64/python/interpreter/PCbuild/lib/tcl8.6/tk8.6"
);
}
},
},
buildIdentifier: 'ViMag_v1.0.0'
}