fix: the app bundle is missing files

This commit is contained in:
Louis 2023-10-02 16:02:06 +07:00 committed by Louis
parent 7b0de2bc0f
commit dabf0f13b1
2 changed files with 9 additions and 3 deletions

View File

@ -11,7 +11,7 @@
"files": [ "files": [
"renderer/**/*", "renderer/**/*",
"build/*.{js,map}", "build/*.{js,map}",
"build/core/plugin-manager/**/*", "build/**/*.{js,map}",
"core/pre-install" "core/pre-install"
], ],
"asarUnpack": [ "asarUnpack": [

View File

@ -1,5 +1,5 @@
// @ts-nocheck // @ts-nocheck
const { app, Menu } = require("electron"); const { app, Menu, dialog } = require("electron");
const isMac = process.platform === "darwin"; const isMac = process.platform === "darwin";
const { autoUpdater } = require("electron-updater"); const { autoUpdater } = require("electron-updater");
@ -12,7 +12,13 @@ const template: (Electron.MenuItemConstructorOptions | Electron.MenuItem)[] = [
{ role: "about" }, { role: "about" },
{ {
label: "Check for Updates...", label: "Check for Updates...",
click: () => autoUpdater.checkForUpdates(), click: () =>
autoUpdater.checkForUpdatesAndNotify().then((e) => {
if (!e || e.updateInfo.files.length === 0)
dialog.showMessageBox({
message: `There are currently no updates available.`,
});
}),
}, },
{ type: "separator" }, { type: "separator" },
{ role: "services" }, { role: "services" },