Browse Source
* Remove squirrel hooks (the installing & uninstalling is now done by the, er, installer) * Switch to electron-auto-update * Shorten initial update delay because we no longer need to wait for squirrel to release a lock file * Change update URLs because windows is now one installer for both 32 & 64 bit. * Update electron-builder to 10 where NSIS is now the default target for Windows. * Add linux to the target list, building a deb. * Remove sqirrel-specific installation spinner * Remove redundant !**/* from filespull/2653/head
4 changed files with 21 additions and 62 deletions
Before Width: | Height: | Size: 23 KiB |
@ -1,30 +0,0 @@
|
||||
const path = require('path'); |
||||
const spawn = require('child_process').spawn; |
||||
const app = require('electron').app; |
||||
|
||||
function run_update_exe(args, done) { |
||||
const updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe'); |
||||
spawn(updateExe, args, { |
||||
detached: true |
||||
}).on('close', done); |
||||
}; |
||||
|
||||
function check_squirrel_hooks() { |
||||
if (process.platform != 'win32') return false; |
||||
|
||||
const cmd = process.argv[1]; |
||||
const target = path.basename(process.execPath); |
||||
if (cmd === '--squirrel-install' || cmd === '--squirrel-updated') { |
||||
run_update_exe(['--createShortcut=' + target + ''], app.quit); |
||||
return true; |
||||
} else if (cmd === '--squirrel-uninstall') { |
||||
run_update_exe(['--removeShortcut=' + target + ''], app.quit); |
||||
return true; |
||||
} else if (cmd === '--squirrel-obsolete') { |
||||
app.quit(); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
module.exports = check_squirrel_hooks; |
Loading…
Reference in new issue