mirror of
https://github.com/upscayl/upscayl.git
synced 2025-02-17 11:18:36 +01:00
Fix refactor
This commit is contained in:
parent
c4f0576091
commit
f69e06521c
@ -1,5 +1,5 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { modelsPath } from "../binaries";
|
import { modelsPath } from "../utils/get-resource-paths";
|
||||||
import COMMAND from "../constants/commands";
|
import COMMAND from "../constants/commands";
|
||||||
import {
|
import {
|
||||||
customModelsFolderPath,
|
customModelsFolderPath,
|
||||||
|
@ -32,9 +32,9 @@ import {
|
|||||||
} from "./utils/config-variables";
|
} from "./utils/config-variables";
|
||||||
import { createMainWindow, getMainWindow } from "./main-window";
|
import { createMainWindow, getMainWindow } from "./main-window";
|
||||||
import electronIsDev from "electron-is-dev";
|
import electronIsDev from "electron-is-dev";
|
||||||
import { getPlatform } from "./get-device-specs";
|
import { getPlatform } from "./utils/get-device-specs";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { execPath, modelsPath } from "./binaries";
|
import { execPath, modelsPath } from "./utils/get-resource-paths";
|
||||||
|
|
||||||
// INITIALIZATION
|
// INITIALIZATION
|
||||||
log.initialize({ preload: true });
|
log.initialize({ preload: true });
|
||||||
|
@ -1,17 +1,6 @@
|
|||||||
import { BrowserWindow, shell } from "electron";
|
import { BrowserWindow } from "electron";
|
||||||
import { getPlatform } from "./get-device-specs";
|
import { getPlatform } from "./utils/get-device-specs";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import {
|
|
||||||
setCustomModelsFolderPath,
|
|
||||||
setFolderPath,
|
|
||||||
setImagePath,
|
|
||||||
setOutputFolderPath,
|
|
||||||
setOverwrite,
|
|
||||||
setQuality,
|
|
||||||
setSaveOutputFolder,
|
|
||||||
} from "./utils/config-variables";
|
|
||||||
import COMMAND from "./constants/commands";
|
|
||||||
import electronIsDev from "electron-is-dev";
|
|
||||||
|
|
||||||
let mainWindow: BrowserWindow | null;
|
let mainWindow: BrowserWindow | null;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ipcRenderer, contextBridge } from "electron";
|
import { ipcRenderer, contextBridge } from "electron";
|
||||||
import { getPlatform } from "./get-device-specs";
|
import { getPlatform } from "./utils/get-device-specs";
|
||||||
|
|
||||||
// 'ipcRenderer' will be available in index.js with the method 'window.electron'
|
// 'ipcRenderer' will be available in index.js with the method 'window.electron'
|
||||||
contextBridge.exposeInMainWorld("electron", {
|
contextBridge.exposeInMainWorld("electron", {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getPlatform } from "../get-device-specs";
|
import { getPlatform } from "./get-device-specs";
|
||||||
const slash: string = getPlatform() === "win" ? "\\" : "/";
|
const slash: string = getPlatform() === "win" ? "\\" : "/";
|
||||||
|
|
||||||
export const getSingleImageArguments = (
|
export const getSingleImageArguments = (
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getPlatform } from "../get-device-specs";
|
import { getPlatform } from "./get-device-specs";
|
||||||
|
|
||||||
const slash: string = getPlatform() === "win" ? "\\" : "/";
|
const slash: string = getPlatform() === "win" ? "\\" : "/";
|
||||||
export default slash;
|
export default slash;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { spawn } from "child_process";
|
import { spawn } from "child_process";
|
||||||
import { execPath } from "../binaries";
|
import { execPath } from "./get-resource-paths";
|
||||||
|
|
||||||
export const spawnUpscayl = (
|
export const spawnUpscayl = (
|
||||||
binaryName: string,
|
binaryName: string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user