2025-03-21 14:30:13 +00:00
|
|
|
import { app } from "electron";
|
2025-04-07 03:30:47 +00:00
|
|
|
import path from "node:path";
|
2025-03-21 14:30:13 +00:00
|
|
|
|
|
|
|
|
const disabledFeatures = ["HardwareMediaKeyHandling"];
|
|
|
|
|
app.commandLine.appendSwitch("disable-features", disabledFeatures.join(","));
|
|
|
|
|
|
2025-04-06 20:13:13 +00:00
|
|
|
export const defaultWindowTitle = "shapez CE";
|
2025-03-21 14:30:13 +00:00
|
|
|
app.setName("shapez-ce");
|
|
|
|
|
|
|
|
|
|
// This variable should be used to avoid situations where the app name
|
|
|
|
|
// wasn't set yet.
|
|
|
|
|
export const userData = app.getPath("userData");
|
2025-04-07 03:30:47 +00:00
|
|
|
export const executableDir = path.dirname(app.getPath("exe"));
|
2025-03-21 14:30:13 +00:00
|
|
|
|
|
|
|
|
export const pageUrl = app.isPackaged
|
|
|
|
|
? new URL("../index.html", import.meta.url).href
|
|
|
|
|
: "http://localhost:3005/";
|
|
|
|
|
|
|
|
|
|
export const switches = {
|
|
|
|
|
dev: app.commandLine.hasSwitch("dev"),
|
|
|
|
|
safeMode: app.commandLine.hasSwitch("safe-mode"),
|
|
|
|
|
};
|