mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-10 05:16:19 +00:00
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import { app } from "electron";
|
|
import path from "node:path";
|
|
import { SystemPath } from "./services/system-path";
|
|
|
|
export const defaultDownloadsPath = SystemPath.getPath("downloads");
|
|
|
|
export const isStaging = import.meta.env.MAIN_VITE_API_URL.includes("staging");
|
|
|
|
export const windowsStartMenuPath = path.join(
|
|
SystemPath.getPath("appData"),
|
|
"Microsoft",
|
|
"Windows",
|
|
"Start Menu",
|
|
"Programs"
|
|
);
|
|
|
|
export const levelDatabasePath = path.join(
|
|
SystemPath.getPath("userData"),
|
|
`hydra-db${isStaging ? "-staging" : ""}`
|
|
);
|
|
|
|
export const commonRedistPath = path.join(
|
|
SystemPath.getPath("userData"),
|
|
"CommonRedist"
|
|
);
|
|
|
|
export const logsPath = path.join(SystemPath.getPath("userData"), "logs");
|
|
|
|
export const seedsPath = app.isPackaged
|
|
? path.join(process.resourcesPath, "seeds")
|
|
: path.join(__dirname, "..", "..", "seeds");
|
|
|
|
export const achievementSoundPath = app.isPackaged
|
|
? path.join(process.resourcesPath, "achievement.wav")
|
|
: path.join(__dirname, "..", "..", "resources", "achievement.wav");
|
|
|
|
export const backupsPath = path.join(SystemPath.getPath("userData"), "Backups");
|
|
|
|
export const appVersion = app.getVersion() + (isStaging ? "-staging" : "");
|
|
|
|
export const MAIN_LOOP_INTERVAL = 1500;
|