#!/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 # Changelog: # 2017-02-07 Start work on this # EXE="$1"; shift case "$(file -b "${EXE}")" in *DOS*) 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: