#!/bin/sh -e

. /usr/lib/wine/wine-prefix
select_wine_backend /usr/bin/wine32-stable /usr/bin/wine64-stable

if [ -z "$wine_backend" ]; then
    echo "error: no Wine loader found. Install wine32 or wine64." >&2
    exit 1
fi

if [ -z "$WINEDEBUG" ]; then
    export WINEDEBUG=fixme-all
fi

exec "$wine_backend" "$@"
