mcopy/app/scripts/build_win.js

33 lines
778 B
JavaScript
Raw Normal View History

const path = require('path');
2018-01-30 09:08:35 +00:00
const { MSICreator } = require('electron-wix-msi');
const package = require('../package.json')
2018-01-30 09:08:35 +00:00
// Step 1: Instantiate the MSICreator
const msiCreator = new MSICreator({
appDirectory: path.resolve(__dirname, '..', '..', 'dist', 'mcopy-win32-x64'),
2018-01-30 09:08:35 +00:00
description: 'mcopy optical printer GUI',
exe: 'mcopy',
name: 'mcopy',
manufacturer: 'sixteenmillimeter.com',
2020-04-29 14:06:51 +00:00
version: package.version,
outputDirectory: path.resolve(__dirname, '..', '..', 'dist')
2018-01-30 09:08:35 +00:00
});
async function build () {
2018-01-30 09:08:35 +00:00
// Step 2: Create a .wxs template file
try {
await msiCreator.create();
} catch (err) {
console.error(err);
}
// Step 3: Compile the template to a .msi file
try {
await msiCreator.compile();
} catch (err) {
console.error(err);
}
}
build();