You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
773 B
31 lines
773 B
#!/bin/sh
|
|
#
|
|
# This is a first very simple script to identify a given M$ executable
|
|
# and launch it with the correct interpreter, either Dosbox or Wine so far.
|
|
#
|
|
# Author: Georg Hopp <georg@steffers.org>
|
|
# Changelog:
|
|
# 2017-02-07 Start work on this
|
|
#
|
|
|
|
EXE="$1"; shift
|
|
|
|
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
|
|
exec /usr/bin/dosbox -exit -conf "${CONFIG}" "${EXE}" "$@"
|
|
;;
|
|
*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:
|