- Remove ALWAYS_ON_TOP and debug print hacks. - Pump SDL events after SDL_ShowWindow so the Wayland compositor maps the window. - Clean run.sh: do not force DISPLAY or SDL_VIDEODRIVER, let SDL3 auto-detect.
20 lines
821 B
Bash
Executable File
20 lines
821 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run the Cortex Engine.
|
|
# Examples:
|
|
# ./scripts/run.sh # run with defaults
|
|
# ./scripts/run.sh --mcp-port 5000 # run with MCP HTTP server
|
|
# ./scripts/run.sh --camera-tour # capture screenshots and exit
|
|
# ./scripts/run.sh --mcp-stdio # run headless stdio MCP server
|
|
|
|
ENGINE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
export DOTNET_ROOT="${DOTNET_ROOT:-$HOME/.dotnet}"
|
|
export PATH="$DOTNET_ROOT:$PATH"
|
|
|
|
# Auto-detect Wayland. SDL3 bundled with ppy.SDL3-CS supports both Wayland and X11;
|
|
# let it choose based on available display servers. Do NOT force DISPLAY here.
|
|
unset SDL_VIDEODRIVER 2>/dev/null
|
|
|
|
cd "$ENGINE_DIR"
|
|
exec dotnet run --project "$ENGINE_DIR/src/CortexEngine.App/CortexEngine.App.csproj" -c Debug -- "$@"
|