mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-11 09:11:50 +00:00
Remove the behavior of automatically opening developer tools when launched with --dev command line switch. As --hide-devtools switch is now unused, remove it as well.
23 lines
724 B
TypeScript
23 lines
724 B
TypeScript
import { app } from "electron";
|
|
import path from "node:path";
|
|
|
|
const disabledFeatures = ["HardwareMediaKeyHandling"];
|
|
app.commandLine.appendSwitch("disable-features", disabledFeatures.join(","));
|
|
|
|
export const defaultWindowTitle = "shapez CE";
|
|
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");
|
|
export const executableDir = path.dirname(app.getPath("exe"));
|
|
|
|
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"),
|
|
};
|