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"));
|
2022-08-26 10:17:24 +02:00
|
|
|
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 };
|