mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
Uniform artifact file names
This commit is contained in:
parent
a968d3c4e9
commit
9f6669378a
2 changed files with 18 additions and 0 deletions
|
@ -19,6 +19,20 @@ module.exports = {
|
|||
"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: [
|
||||
{
|
||||
|
@ -41,6 +55,7 @@ module.exports = {
|
|||
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) => {
|
||||
|
|
|
@ -4,6 +4,8 @@ const path = require('path');
|
|||
const Store = require('electron-store');
|
||||
Store.initRenderer();
|
||||
|
||||
const { SITLProcess } = require('./sitl');
|
||||
|
||||
require('@electron/remote/main').initialize();
|
||||
|
||||
const usbBootloaderIds = [
|
||||
|
@ -152,6 +154,7 @@ app.on('ready', () => {
|
|||
app.on('window-all-closed', () => {
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
SITLProcess.stop();
|
||||
app.quit();
|
||||
}
|
||||
console.log("We're closing...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue