|
|
@ -62,6 +62,12 @@ if (electronIsDev) { |
|
|
|
setupReloadWatcher(myCapacitorApp); |
|
|
|
} |
|
|
|
|
|
|
|
// Configure auto-updater
|
|
|
|
autoUpdater.on('error', (error) => { |
|
|
|
console.log('Auto-updater error (suppressed):', error.message); |
|
|
|
// Don't show error dialogs for update check failures
|
|
|
|
}); |
|
|
|
|
|
|
|
// Run Application
|
|
|
|
(async () => { |
|
|
|
// Wait for electron app to be ready.
|
|
|
@ -70,8 +76,15 @@ if (electronIsDev) { |
|
|
|
setupContentSecurityPolicy(myCapacitorApp.getCustomURLScheme()); |
|
|
|
// Initialize our app, build windows, and load content.
|
|
|
|
await myCapacitorApp.init(); |
|
|
|
// Check for updates if we are in a packaged app.
|
|
|
|
|
|
|
|
// Only check for updates in production builds, not in development or AppImage
|
|
|
|
if (!electronIsDev && !process.env.APPIMAGE) { |
|
|
|
try { |
|
|
|
autoUpdater.checkForUpdatesAndNotify(); |
|
|
|
} catch (error) { |
|
|
|
console.log('Update check failed (suppressed):', error); |
|
|
|
} |
|
|
|
} |
|
|
|
})(); |
|
|
|
|
|
|
|
// Handle when all of our windows are close (platforms have their own expectations).
|
|
|
|