|
@@ -14,7 +14,7 @@ if (require('electron-squirrel-startup')) { // eslint-disable-line global-requir
|
|
|
/* --- Initialisation --- */
|
|
|
|
|
|
// Global var
|
|
|
-let mainWindow;
|
|
|
+global.mainWindow;
|
|
|
let launchInfo;
|
|
|
let indexFile = 'src/index.html';
|
|
|
|
|
@@ -36,14 +36,14 @@ async function main() {
|
|
|
if (file.exist(path.join(__dirname, '/data/launch-info.json'))) {
|
|
|
launchInfo = require('./data/launch-info');
|
|
|
// Reset data if change source between src and app
|
|
|
- if (launchInfo.app === program.src) {
|
|
|
+ if (launchInfo.folder !== folder) {
|
|
|
indexFile = 'src/reset.html';
|
|
|
}
|
|
|
// Update launch info
|
|
|
- launchInfo.app = !program.src;
|
|
|
+ launchInfo.folder = folder
|
|
|
} else {
|
|
|
launchInfo = {
|
|
|
- app: !program.src
|
|
|
+ folder: folder
|
|
|
}
|
|
|
}
|
|
|
// Edit launch info file
|