1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-14 10:47:56 +01:00
upscayl/main/binaries.js

17 lines
615 B
JavaScript
Raw Normal View History

2022-08-23 16:07:40 +02:00
const { join, dirname } = require("path");
2022-08-16 04:17:27 +02:00
const path = require("path");
const { getPlatform } = require("./getPlatform");
2022-08-23 16:07:40 +02:00
const appRootDir = require("app-root-dir");
2022-08-23 16:17:16 +02:00
const isDev = require("electron-is-dev");
2022-08-16 04:17:27 +02:00
2022-08-23 16:17:16 +02:00
const binariesPath = isDev
? join(appRootDir.get(), "resources", getPlatform(), "bin")
: join(dirname(appRootDir.get()), "..", "Resources", "bin");
2022-08-16 04:17:27 +02:00
const execPath = path.resolve(path.join(binariesPath, "./upscayl"));
const modelsPath = isDev
? path.resolve(path.join(binariesPath, "../../models"))
: path.resolve(path.join(binariesPath, "../models"))
2022-08-16 04:17:27 +02:00
module.exports = { execPath, modelsPath };