1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-12 01:40:53 +01:00

Fix refactor

This commit is contained in:
Nayam Amarshe 2023-09-10 23:30:49 +05:30
parent 9e7c9c20d8
commit c99f6b5523
9 changed files with 9 additions and 20 deletions

View File

@ -1,5 +1,5 @@
import fs from "fs";
import { modelsPath } from "../binaries";
import { modelsPath } from "../utils/get-resource-paths";
import COMMAND from "../constants/commands";
import {
customModelsFolderPath,

View File

@ -32,9 +32,9 @@ import {
} from "./utils/config-variables";
import { createMainWindow, getMainWindow } from "./main-window";
import electronIsDev from "electron-is-dev";
import { getPlatform } from "./get-device-specs";
import { getPlatform } from "./utils/get-device-specs";
import { join } from "path";
import { execPath, modelsPath } from "./binaries";
import { execPath, modelsPath } from "./utils/get-resource-paths";
// INITIALIZATION
log.initialize({ preload: true });

View File

@ -1,17 +1,6 @@
import { BrowserWindow, shell } from "electron";
import { getPlatform } from "./get-device-specs";
import { BrowserWindow } from "electron";
import { getPlatform } from "./utils/get-device-specs";
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;

View File

@ -1,5 +1,5 @@
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'
contextBridge.exposeInMainWorld("electron", {

View File

@ -1,4 +1,4 @@
import { getPlatform } from "../get-device-specs";
import { getPlatform } from "./get-device-specs";
const slash: string = getPlatform() === "win" ? "\\" : "/";
export const getSingleImageArguments = (

View File

@ -1,4 +1,4 @@
import { getPlatform } from "../get-device-specs";
import { getPlatform } from "./get-device-specs";
const slash: string = getPlatform() === "win" ? "\\" : "/";
export default slash;

View File

@ -1,5 +1,5 @@
import { spawn } from "child_process";
import { execPath } from "../binaries";
import { execPath } from "./get-resource-paths";
export const spawnUpscayl = (
binaryName: string,