update of building

This commit is contained in:
sguenter 2024-01-06 09:17:20 +01:00
parent d88d61bb3b
commit 2850756e6d
2 changed files with 10 additions and 9 deletions

View File

@ -23,6 +23,13 @@
}, },
"mac": { "mac": {
"category": "your.app.category.type", "category": "your.app.category.type",
"target": "dmg" "target": [
{
"target": "mac-universal",
"arch": [
"universal"
]
}
]
} }
} }

View File

@ -4,7 +4,6 @@ import type { MenuItemConstructorOptions } from 'electron';
import { app, MenuItem } from 'electron'; import { app, MenuItem } from 'electron';
import electronIsDev from 'electron-is-dev'; import electronIsDev from 'electron-is-dev';
import unhandled from 'electron-unhandled'; import unhandled from 'electron-unhandled';
import { autoUpdater } from 'electron-updater';
import { ElectronCapacitorApp, setupContentSecurityPolicy, setupReloadWatcher } from './setup'; import { ElectronCapacitorApp, setupContentSecurityPolicy, setupReloadWatcher } from './setup';
@ -54,16 +53,11 @@ if (electronIsDev) {
// Initialize our app, build windows, and load content. // Initialize our app, build windows, and load content.
await myCapacitorApp.init(); await myCapacitorApp.init();
// Check for updates if we are in a packaged app. // Check for updates if we are in a packaged app.
autoUpdater.checkForUpdatesAndNotify();
})(); })();
// Handle when all of our windows are close (platforms have their own expectations). // Handle when all of our windows are close (platforms have their own expectations).
app.on('window-all-closed', function () { app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar app.quit();
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit();
}
}); });
// When the dock icon is clicked. // When the dock icon is clicked.