Windows path differences from linux/darwin are ruining my day https://github.com/felixrieseberg/electron-wix-msi/issues/5
This commit is contained in:
parent
4a1bf417a4
commit
a379e4b086
|
@ -1,19 +1,33 @@
|
||||||
|
const path = require('path');
|
||||||
const { MSICreator } = require('electron-wix-msi');
|
const { MSICreator } = require('electron-wix-msi');
|
||||||
const package = require('../package.json')
|
const package = require('../package.json')
|
||||||
|
|
||||||
// Step 1: Instantiate the MSICreator
|
// Step 1: Instantiate the MSICreator
|
||||||
const msiCreator = new MSICreator({
|
const msiCreator = new MSICreator({
|
||||||
appDirectory: '../dist/mcopy-win32-x64',
|
appDirectory: path.resolve(__dirname, '..', 'dist', 'mcopy-win32-x64'),
|
||||||
description: 'mcopy optical printer GUI',
|
description: 'mcopy optical printer GUI',
|
||||||
exe: 'mcopy',
|
exe: 'mcopy',
|
||||||
name: 'mcopy',
|
name: 'mcopy',
|
||||||
manufacturer: 'sixteenmillimeter.com',
|
manufacturer: 'sixteenmillimeter.com',
|
||||||
version: package.version,
|
version: package.version,
|
||||||
outputDirectory: '../dist/'
|
outputDirectory: path.resolve(__dirname, '..', 'dist')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
async function build () {
|
||||||
|
|
||||||
// Step 2: Create a .wxs template file
|
// Step 2: Create a .wxs template file
|
||||||
msiCreator.create();
|
try {
|
||||||
|
await msiCreator.create();
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
|
||||||
// Step 3: Compile the template to a .msi file
|
// Step 3: Compile the template to a .msi file
|
||||||
setTimeout(msiCreator.compile, 30000)
|
try {
|
||||||
|
await msiCreator.compile();
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
build();
|
Loading…
Reference in New Issue