Application dosbox

From campisano.org
Jump to navigation Jump to search

Dosbox

Install

su -
#### as root
# cleanup
apt-get autoremove --purge \*dosbox\*
# dependencies for terminal version
apt-get install curl tar gzip gcc make libsdl1.2-dev
# binary
DESTINATION="/home/shared/opt/software"                 # Edit when needed
VERSION="0.74-3"                                        # Edit when needed
URL="https://ufpr.dl.sourceforge.net/project/dosbox/dosbox/0.74-3/dosbox-${VERSION}.tar.gz"
umask 0027
mkdir -p "${DESTINATION}/tmp"
cd "${DESTINATION}/tmp"
curl -C - -kLO "${URL}"
tar -xzf "dosbox-${VERSION}.tar.gz"
cd "dosbox-${VERSION}"
# configure for terminal version
CFLAGS="-g0 -O3 -march=native -s" ./configure --prefix=${DESTINATION}/dosbox-${VERSION} --enable-alsa-midi
make
make install
cd "${DESTINATION}"
chown -R root:users "dosbox-${VERSION}"
find "dosbox-${VERSION}" -type d -exec chmod a-s,u+rwx,g+rx,g-w,o-rwx {} \;
find "dosbox-${VERSION}" -type f -exec chmod a-s,u+rw,g+r,g-w,o-rwx {} \;
rm -rf tmp dosbox
ln -s "dosbox-${VERSION}" dosbox
exit
#### as final user
SOFTWARE_PATH="/home/shared/opt/software"               # Edit when needed
"${SOFTWARE_PATH}/dosbox/bin/dosbox"