Files
lightgui/ide
T
cnmcdee e4dda4da5f Step 6: simplify ide to a single process, delete the layout process
ide just launches ./lightgui (builds only with --build via plain make;
the redundant cmake re-build is gone). Delete widgets/layout/ (the
standalone layout executable) and drop it from widgets/CMakeLists.txt.
The file-based IPC header widgets/common/ipc.h is KEPT: it is still
referenced by widgets/palette/main_palette.cpp, which is now dead code
(ide no longer launches the palette process) but was not authorized
for deletion in this step.
2026-11-30 00:42:16 +00:00

42 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# ./ide -- start the LightGUI designer.
# The designer is a single process now: the XFrame-native canvas is
# embedded in the designer window (step 1), the palette is the
# designer's own XFrame-only window (547 widgets, step 5), and the
# standalone palette/layout processes are deleted (step 6). There is
# nothing else to launch or clean up.
#
# Usage: ./ide [--build] [--help]
# --build rebuild first (plain `make`: designer + widget demos)
# Requires an X display; under Xvfb: Xvfb :97 -screen 0 1920x1080x24 &
# DISPLAY=:97 ./ide
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
BUILD=0
for a in "$@"; do
case "$a" in
--build) BUILD=1 ;;
--help|-h)
echo "Usage: $0 [--build] [--help]"
echo "Starts the LightGUI designer (single process). Needs an X display."
exit 0 ;;
*) echo "ide: unknown option: $a" >&2; exit 2 ;;
esac
done
if [ -z "$DISPLAY" ]; then
echo "ide: no X display (DISPLAY is unset)." >&2
echo "ide: run under Xvfb, e.g. Xvfb :97 -screen 0 1920x1080x24 &" >&2
echo "ide: DISPLAY=:97 ./ide" >&2
exit 1
fi
if [ "$BUILD" = 1 ] || [ ! -x "$ROOT/lightgui" ]; then
echo "ide: building..."
make -C "$ROOT" || exit 1
fi
export LIGHTGUI_ICONS="$ROOT/widgets/icons"
(cd "$ROOT" && exec ./lightgui)