Last active
November 25, 2019 22:18
-
-
Save dill0wn/ce26d241fe3063db16135b811217c16e to your computer and use it in GitHub Desktop.
I have Dark Forces on Steam. Cool. Unfortunately here in 2019, we have Catalina. Because of Catalina, I am no longer able to launch DF (and many other applications) through Steam because the executable is 32 bit (Catalina dropped 32-bit application support). Luckily the Steam version of DF is mostly a simple DOSBox wrapper around the original ga…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############################################################################### | |
# DARK FORCES DOSBOX LAUNCHER | |
############################################################################### | |
# This quick-n-dirty script assumes you already have dosbox installed via brew | |
# create tmp file handle | |
tmpconf=$(mktemp /tmp/dosbox.darkforces.conf.XXXXXX) | |
#echo created temp file: $tmpconf | |
# path to darkforces game files (installed via steam) | |
GAMEFILES='~/Library/Application Support/Steam/steamapps/common/Dark Forces/Star Wars Dark Forces.boxer/C.harddisk' | |
# custom dosbox.conf settings to overwrite your default (set in ~/Library/Preferences/Dosbox-something-something) | |
cat << EOF > $tmpconf | |
[sdl] | |
fullscreen=true | |
# replace with resolution of your choice or 'original' | |
fullresolution=2560x1440 | |
output=opengl | |
[render] | |
aspect=false | |
scaler=normal3x | |
[autoexec] | |
mount c "$GAMEFILES" | |
c: | |
DARK.EXE | |
EOF | |
# launch dosbox | |
# if Dosbox.app installed, used that | |
if [ -d /Applications/dosbox.app ]; then | |
echo "/Applications/Dosbox.app is installed" | |
/Applications/dosbox.app/Contents/MacOS/DOSBox -conf "$tmpconf" | |
# fallback: if brew dosbox installed, then used that | |
elif command -v dosbox >/dev/null 2>&1; then | |
echo "dosbox is installed view brew" | |
dosbox -conf "$tmpconf" | |
# fallback: if brew dosbox NOT installed, but brew installed, try installing that, then launching game | |
elif command -v brew >/dev/null 2>&1; then | |
echo "dosbox is not installed. however brew is; installing dosbox via brew..."; | |
brew install dosbox | |
brew link dosbox | |
echo "dosbox installed succesfully"; | |
dosbox -conf "$tmpconf" | |
else | |
echo "dosbox is not installed and brew is not installe, unable to launch..."; | |
fi | |
# clean up tmp file handle | |
exec 3>"$tmpconf" | |
rm "$tmpconf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This snippet could be forked/altered to act as a dosbox launcher for any game you might want and with any settings you might want.