-
Notifications
You must be signed in to change notification settings - Fork 320
/
forge.config.js
114 lines (112 loc) · 3.54 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
const path = require('path');
const fs = require('fs');
module.exports = {
packagerConfig: {
executableName: "inav-configurator",
asar: false,
icon: 'images/inav',
ignore: [
"^(\/\.vscode$)",
"^(\/support$)",
".gitattributes",
".gitignore",
"3D_model_creation.md",
"LICENSE",
"MAPPROXY.md",
"package-lock.json",
"README.md",
"inav_icon_128.psd",
]
},
hooks: {
// Uniform artifact file names
postMake: async (config, makeResults) => {
makeResults.forEach(result => {
var baseName = `${result.packageJSON.productName.replace(' ', '-')}_${result.platform}_${result.arch}_${result.packageJSON.version}`;
result.artifacts.forEach(artifact => {
var artifactStr = artifact.toString();
var newPath = path.join(path.dirname(artifactStr), baseName + path.extname(artifactStr));
fs.renameSync(artifactStr, newPath);
console.log('Artifact: ' + newPath);
});
});
}
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-wix',
config: {
name: "INAV Configurator",
shortName: "INAV",
exe: "inav-configurator",
description: "Configurator for the open source flight controller software INAV.",
programFilesFolderName: "inav-configurator",
shortcutFolderName: "INAV",
manufacturer: "The INAV open source project",
appUserModelId: "com.inav.configurator",
icon: path.join(__dirname, "./assets/windows/inav_installer_icon.ico"),
upgradeCode: "13606ff3-b0bc-4dde-8fac-805bc8aed2f8",
ui : {
enabled: false,
chooseDirectory: true,
images: {
background: path.join(__dirname, "./assets/windows/background.jpg"),
banner: path.join(__dirname, "./assets/windows/banner.jpg")
}
},
// Standard WiX template appends the unsightly "(Machine - WSI)" to the name, so use our own template
beforeCreate: (msiCreator) => {
return new Promise((resolve, reject) => {
fs.readFile(path.join(__dirname,"./assets/windows/wix.xml"), "utf8" , (err, content) => {
if (err) {
reject (err);
}
msiCreator.wixTemplate = content;
resolve();
});
});
}
}
},
{
name: '@electron-forge/maker-dmg',
config: {
name: "INAV Configurator",
background: "./assets/osx/dmg-background.png",
icon: "./images/inav.icns"
}
},
{
name: '@electron-forge/maker-zip',
platforms: ['win32', 'linux', 'darwin'],
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
name: "inav-configurator",
productName: "INAV Configurator",
categories: ["Utility"],
icon: "./assets/linux/icon/inav_icon_128.png",
description: "Configurator for the open source flight controller software INAV.",
homepage: "https://github.com/inavflight/",
}
},
},
{
name: '@electron-forge/maker-rpm',
config: {
options: {
name: "inav-configurator",
productName: "INAV Configurator",
license: "GPL-3.0",
categories: ["Utility"],
icon: "./assets/linux/icon/inav_icon_128.png",
description: "Configurator for the open source flight controller software INAV.",
homepage: "https://github.com/inavflight/",
}
},
},
],
};