delay install splash screen so user sees it

This commit is contained in:
Feross Aboukhadijeh
2016-03-25 00:55:19 -07:00
parent bdf7110135
commit 78f08487c4

View File

@@ -9,41 +9,46 @@ var app = electron.app
var handlers = require('./handlers') var handlers = require('./handlers')
function handleArgv (cmd) { function handleArgv (cmd) {
if (cmd === '--squirrel-install' || cmd === '--squirrel-updated') { if (cmd === '--squirrel-install') {
// App was just installed.
handlers.init() handlers.init()
// TODO: // TODO:
// - Install desktop and start menu shortcuts // - Install desktop and start menu shortcuts
// - Add explorer context menus // - Add explorer context menus
// Always quit when done // Ensure user sees install splash screen so they realize that Setup.exe actually
// installed an application and isn't the application itself.
setTimeout(function () {
app.quit()
}, 5000)
return true
}
if (cmd === '--squirrel-updated') {
// App was just updated. (Called on new version of app.)
handlers.init()
app.quit() app.quit()
return true return true
} }
if (cmd === '--squirrel-uninstall') { if (cmd === '--squirrel-uninstall') {
// Undo anything we did in the --squirrel-install and --squirrel-updated handlers // App was just uninstalled. Undo anything we did in the --squirrel-install and
// --squirrel-updated handlers
// TODO: implement this // TODO: implement this
// Always quit when done
app.quit() app.quit()
return true return true
} }
if (cmd === '--squirrel-obsolete') { if (cmd === '--squirrel-obsolete') {
// This is called on the outgoing version of your app before we update to the new // App will be updated. (Called on outgoing version of app.)
// version - it's the opposite of --squirrel-updated
// Always quit when done
app.quit() app.quit()
return true return true
} }
if (cmd === '--squirrel-firstrun') { if (cmd === '--squirrel-firstrun') {
// This is called on the first run of the app. // This is called on the app's first run. Do not quit, allow startup to continue.
// Do not quit the app
return false return false
} }