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",
|
"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: {},
|
rebuildConfig: {},
|
||||||
makers: [
|
makers: [
|
||||||
{
|
{
|
||||||
|
@ -41,6 +55,7 @@ module.exports = {
|
||||||
banner: path.join(__dirname, "./assets/windows/banner.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) => {
|
beforeCreate: (msiCreator) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
fs.readFile(path.join(__dirname,"./assets/windows/wix.xml"), "utf8" , (err, content) => {
|
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');
|
const Store = require('electron-store');
|
||||||
Store.initRenderer();
|
Store.initRenderer();
|
||||||
|
|
||||||
|
const { SITLProcess } = require('./sitl');
|
||||||
|
|
||||||
require('@electron/remote/main').initialize();
|
require('@electron/remote/main').initialize();
|
||||||
|
|
||||||
const usbBootloaderIds = [
|
const usbBootloaderIds = [
|
||||||
|
@ -152,6 +154,7 @@ app.on('ready', () => {
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
|
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
|
SITLProcess.stop();
|
||||||
app.quit();
|
app.quit();
|
||||||
}
|
}
|
||||||
console.log("We're closing...");
|
console.log("We're closing...");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue