1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-13 18:30:54 +01:00
upscayl/main/binaries.js
2022-08-23 19:37:40 +05:30

16 lines
562 B
JavaScript

const { join, dirname } = require("path");
const path = require("path");
const { getPlatform } = require("./getPlatform");
const appRootDir = require("app-root-dir");
const IS_PROD = process.env.NODE_ENV === "production";
const binariesPath = IS_PROD
? join(dirname(appRootDir.get()), "..", "Resources", "bin")
: join(appRootDir.get(), "resources", getPlatform(), "bin");
const execPath = path.resolve(path.join(binariesPath, "./upscayl"));
const modelsPath = path.resolve(path.join(binariesPath, "./models"));
module.exports = { execPath, modelsPath };