mirror of
https://github.com/upscayl/upscayl.git
synced 2026-04-03 03:00:13 -04:00
Fix build
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import prepareNext from "electron-next";
|
||||
import { autoUpdater } from "electron-updater";
|
||||
import log from "electron-log";
|
||||
import { app, ipcMain, protocol, net } from "electron";
|
||||
import { app, ipcMain, protocol } from "electron";
|
||||
import COMMAND from "./constants/commands";
|
||||
import logit from "./utils/logit";
|
||||
import openFolder from "./commands/open-folder";
|
||||
@@ -18,7 +18,7 @@ import batchUpscayl from "./commands/batch-upscayl";
|
||||
import doubleUpscayl from "./commands/double-upscayl";
|
||||
import autoUpdate from "./commands/auto-update";
|
||||
import sharp from "sharp";
|
||||
import { getPlatform } from "./utils/get-device-specs";
|
||||
import { featureFlags } from "../common/feature-flags";
|
||||
|
||||
// INITIALIZATION
|
||||
log.initialize({ preload: true });
|
||||
@@ -51,7 +51,8 @@ app.on("window-all-closed", () => {
|
||||
});
|
||||
|
||||
// ! ENABLE THIS FOR MACOS APP STORE BUILD
|
||||
if (getPlatform() === "mac") {
|
||||
if (featureFlags.APP_STORE_BUILD) {
|
||||
logit("🚀 APP STORE BUILD ENABLED");
|
||||
app.commandLine.appendSwitch("in-process-gpu");
|
||||
}
|
||||
|
||||
@@ -73,4 +74,6 @@ ipcMain.on(COMMAND.FOLDER_UPSCAYL, batchUpscayl);
|
||||
|
||||
ipcMain.on(COMMAND.DOUBLE_UPSCAYL, doubleUpscayl);
|
||||
|
||||
// autoUpdater.on("update-downloaded", autoUpdate);
|
||||
if (!featureFlags.APP_STORE_BUILD) {
|
||||
autoUpdater.on("update-downloaded", autoUpdate);
|
||||
}
|
||||
|
||||
@@ -2,23 +2,14 @@ import { BrowserWindow, shell } from "electron";
|
||||
import { getPlatform } from "./utils/get-device-specs";
|
||||
import { join } from "path";
|
||||
import COMMAND from "./constants/commands";
|
||||
import {
|
||||
overwrite,
|
||||
setCustomModelsFolderPath,
|
||||
setFolderPath,
|
||||
setImagePath,
|
||||
setOutputFolderPath,
|
||||
setOverwrite,
|
||||
setCompression,
|
||||
setSaveOutputFolder,
|
||||
fetchLocalStorage,
|
||||
} from "./utils/config-variables";
|
||||
import { fetchLocalStorage } from "./utils/config-variables";
|
||||
import electronIsDev from "electron-is-dev";
|
||||
import { format } from "url";
|
||||
|
||||
let mainWindow: BrowserWindow | undefined;
|
||||
|
||||
const createMainWindow = () => {
|
||||
console.log("📂 DIRNAME", __dirname);
|
||||
mainWindow = new BrowserWindow({
|
||||
icon: join(__dirname, "build", "icon.png"),
|
||||
width: 1300,
|
||||
|
||||
Reference in New Issue
Block a user