mirror of
https://github.com/upscayl/upscayl.git
synced 2026-04-03 03:00:13 -04:00
Fix model
This commit is contained in:
@@ -20,10 +20,10 @@ import autoUpdate from "./commands/auto-update";
|
||||
import { FEATURE_FLAGS } from "../common/feature-flags";
|
||||
import settings from "electron-settings";
|
||||
import pasteImage from "./commands/paste-image";
|
||||
import path from "path";
|
||||
|
||||
// INITIALIZATION
|
||||
log.initialize({ preload: true });
|
||||
logit("🚃 App Path: ", app.getAppPath());
|
||||
|
||||
app.on("ready", async () => {
|
||||
await prepareNext("./renderer");
|
||||
@@ -33,6 +33,14 @@ app.on("ready", async () => {
|
||||
const pathname = decodeURI(request.url.replace("file:///", ""));
|
||||
callback(pathname);
|
||||
});
|
||||
protocol.registerFileProtocol("public", (request, callback) => {
|
||||
const filePath = decodeURI(request.url.replace("public:///", ""));
|
||||
const asarPath = path.join(app.getAppPath(), "renderer", "out", filePath);
|
||||
console.log("🚀 => asarPath:", asarPath);
|
||||
|
||||
callback(asarPath);
|
||||
});
|
||||
logit("🚃 App Path: ", app.getAppPath());
|
||||
});
|
||||
|
||||
createMainWindow();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BrowserWindow, shell } from "electron";
|
||||
import { app, BrowserWindow, shell } from "electron";
|
||||
import { getPlatform } from "./utils/get-device-specs";
|
||||
import { join } from "path";
|
||||
import { ELECTRON_COMMANDS } from "../common/electron-commands";
|
||||
@@ -11,6 +11,8 @@ let mainWindow: BrowserWindow | undefined;
|
||||
|
||||
const createMainWindow = () => {
|
||||
console.log("📂 DIRNAME", __dirname);
|
||||
console.log("🚃 App Path: ", app.getAppPath());
|
||||
|
||||
mainWindow = new BrowserWindow({
|
||||
icon: join(__dirname, "build", "icon.png"),
|
||||
width: 1300,
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { ipcRenderer, contextBridge, app } from "electron";
|
||||
import { ipcRenderer, contextBridge } from "electron";
|
||||
import {
|
||||
getAppVersion,
|
||||
getDeviceSpecs,
|
||||
getPlatform,
|
||||
} from "./utils/get-device-specs";
|
||||
import { FEATURE_FLAGS } from "@common/feature-flags";
|
||||
|
||||
// 'ipcRenderer' will be available in index.js with the method 'window.electron'
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
|
||||
Reference in New Issue
Block a user