Browse Source

still fixing wine exe, lnk and dosbox calls...by the way simplify script

master v0.4
Georg Hopp 9 years ago
parent
commit
36f5fb370c
  1. 26
      exelaunch.sh

26
exelaunch.sh

@ -8,28 +8,24 @@
# 2017-02-07 Start work on this
#
function get_interpreter() {
local EXE="$1"
echo "$(basename "${EXE}")" >&2
EXE="$1"; shift
case "$(file -b "${EXE}")" in
case "$(file -b "${EXE}")" in
*DOS*)
local CONFIG="${HOME}/.dosbox/$(basename "${EXE}").conf"
if [ ! \( -e "${CONFIG}" \) ]
then
cp "${HOME}/.dosbox/dosbox-SVN.conf" "${CONFIG}"
fi
echo -n "/usr/bin/dosbox -exit -conf ${CONFIG}"
exec /usr/bin/dosbox -exit -conf "${CONFIG}" "${EXE}" "$@"
;;
*Windows\ shortcut*) echo -n "/usr/bin/wine start";;
*Windows*) echo -n "/usr/bin/wine";;
esac
}
EXE="$1"; shift
WINEXE="${EXE/${WINEPREFIX}drive_c/C:}"
WINEXE="${WINEXE//\//\\}"
exec $(get_interpreter "${EXE}") "${WINEXE}" "$@"
*Windows\ shortcut*)
WINEXE="${EXE/${WINEPREFIX}drive_c/C:}"
WINEXE="${WINEXE//\//\\}"
exec /usr/bin/wine start "${WINEXE}" "$@"
;;
*Windows*) exec /usr/bin/wine "${EXE}" "$@";;
*) exec "${EXE}" "${@}";;
esac
# vim: ft=sh ts=4 sw=4:
Loading…
Cancel
Save