Files

27 lines
657 B
Bash
Executable File

#!/bin/sh
# Run the SAPI4 host with the configured wine prefix and X display.
# Usage: setup/run.sh [sapi4host args...]
set -eu
HERE=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
. "$HERE/config.sh"
if [ -z "${DISPLAY:-}" ]; then
if ! [ -S "$MICROSLOP_XSOCK" ]; then
"$MICROSLOP_XVFB" "$MICROSLOP_DISPLAY" -screen 0 1024x768x24 >/dev/null 2>&1 &
sleep 1
fi
export DISPLAY=$MICROSLOP_DISPLAY
fi
HOST="$MICROSLOP_BUILD/sapi4host-winlib.exe"
if [ ! -x "$HOST" ]; then
HOST="$MICROSLOP_BUILD/sapi4host.exe"
fi
if [ ! -x "$HOST" ]; then
echo "no host binary; run setup/install.sh first" >&2
exit 1
fi
exec "$HOST" "$@"