Skip to content

Commit

Permalink
Windows path differences from linux/darwin are ruining my day electro…
Browse files Browse the repository at this point in the history
  • Loading branch information
sixteenmillimeter committed Jul 7, 2020
1 parent 4a1bf41 commit a379e4b
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions app/scripts/build_win.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
const path = require('path');
const { MSICreator } = require('electron-wix-msi');
const package = require('../package.json')

// Step 1: Instantiate the MSICreator
const msiCreator = new MSICreator({
appDirectory: '../dist/mcopy-win32-x64',
appDirectory: path.resolve(__dirname, '..', 'dist', 'mcopy-win32-x64'),
description: 'mcopy optical printer GUI',
exe: 'mcopy',
name: 'mcopy',
manufacturer: 'sixteenmillimeter.com',
version: package.version,
outputDirectory: '../dist/'
outputDirectory: path.resolve(__dirname, '..', 'dist')
});

// Step 2: Create a .wxs template file
msiCreator.create();
async function build () {

// Step 3: Compile the template to a .msi file
setTimeout(msiCreator.compile, 30000)
// 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();

0 comments on commit a379e4b

Please sign in to comment.