Customize installer

This commit is contained in:
2026-01-04 15:05:13 +01:00
parent 50e7ea9a81
commit a2a123ebd3
5 changed files with 68 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ function createWindow() {
icon: path.join(__dirname, "../resources/assets/icon/appicon.ico"),
webPreferences: { backgroundThrottling: false },
});
win.setMenu(null);
applicationWindow.setMenu(null);
let canvasSizeInterval;
const clearCanvasSizeInterval = () => {

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env sh
set -eu
APP_ENTRY="src/main/node/app.js"
SCREEN="1280x800"
for d in 99 98 97 96 95; do
if ! xdpyinfo -display ":$d" >/dev/null 2>&1; then
DISP="$d"
break
fi
done
[ -n "${DISP:-}" ] || {
echo "No free DISPLAY found" >&2
exit 1
}
echo "Using DISPLAY=:$DISP"
Xephyr ":$DISP" -screen "$SCREEN" -resizeable -ac &
XEPHYR_PID=$!
cleanup() {
kill "$ELECTRON_PID" "$OPENBOX_PID" "$XEPHYR_PID" 2>/dev/null || true
}
trap cleanup EXIT INT TERM
sleep 1
DISPLAY=":$DISP" openbox &
OPENBOX_PID=$!
sleep 0.5
DISPLAY=":$DISP" electron "$APP_ENTRY" &
ELECTRON_PID=$!
# monitor X server — when it dies, kill Electron
while kill -0 "$XEPHYR_PID" 2>/dev/null; do
sleep 0.5
done
echo "Xephyr exited — killing Electron"
kill "$ELECTRON_PID" 2>/dev/null || true
wait "$ELECTRON_PID" 2>/dev/null || true