How to run GOG DosBox games on Linux.
May be this would be useful to someone who is new to Linux. I usually do this for DosBox games from GOG, but new Linux users might be unfamiliar with the procedure.
I just got a Strike Commander from GOG (http://gog.com/gamecard/strike_commander), which is an old DOS game, so in order to play it one would use DosBox. GOG packages DosBox with such DOS games, but targets Windows users. So Linux users would need to perform some manual steps to play it using the native distro's DosBox (there surely is no point in running Windows DosBox through Wine).
1. First, get the package (in my case it was setup_strike_commander_2.0.0.5.exe). You can use the handy Linux GOG downloader for that (https://github.com/Sude-/lgogdownloader).
2. Unpack it with innoextract (no need to install it with Wine). innoextract 1.4 worked for me (but I had to compile it from source, since current Debian testing still ships 1.2 which produces errors for current GOG packages):
Let's say you saved the package in $HOME/Games/install/gog/strike_commander
3. You'll see app and tmp directories created. You don't need the tmp one, but you can read tmp/GOG_EULA.txt first.
4. Create the destination directory for the game (let's say $HOME/Games/strike_commander or whatever you choose - change appropriately).
5. Move needed files to the destination directory, and then remove empty source one:
6. Clear unnecessary stuff from the destination (like the Windows build of DosBox and some dll files which have no use on Linux):
7. Now take a look at provided DosBox configuration files. In this case you'll see: dosboxSC.conf and dosboxSC_single.conf. Look inside them - it's worth getting familiar with basic DosBox configuration in general. The first file appears to be general DosBox settings, while the second one is actually for launching the game.
Note that the second file mounts an iso image for the game (SC.dat) as a virtual disk "D", and mounts the game directory as a virtual disk "C". We'll have to modify that to use Linux filesystem syntax (instead of Windows one). So we change mount C ".." to use correct absolute path as well as imgmount d -t iso -fs iso "..\SC.dat". To avoid confusion - it's not about changing C and D, that's internal DosBox (DOS) syntax and it's right. What's changing are native paths that are mounted. Windows uses backslashes: \ while Linux uses slashes: /. Plus adding absolute paths here is helpful for launching the game from some other directory, like with the launcher. You can do this change using some editor, or purely in terminal as follows (useful for some script automation):
8. Now you are basically ready to run the game. If you are in the game directory:
For convenience, you can create a launcher for your desktop using that command, just use the full path for each config file in that case (I'm leaving this excercise to you). The icon for the game is gfw_high.ico located in the $dest_dir (you can assign it to the launcher to make it nicer). Enjoy!
May be this would be useful to someone who is new to Linux. I usually do this for DosBox games from GOG, but new Linux users might be unfamiliar with the procedure.
I just got a Strike Commander from GOG (http://gog.com/gamecard/strike_commander), which is an old DOS game, so in order to play it one would use DosBox. GOG packages DosBox with such DOS games, but targets Windows users. So Linux users would need to perform some manual steps to play it using the native distro's DosBox (there surely is no point in running Windows DosBox through Wine).
1. First, get the package (in my case it was setup_strike_commander_2.0.0.5.exe). You can use the handy Linux GOG downloader for that (https://github.com/Sude-/lgogdownloader).
2. Unpack it with innoextract (no need to install it with Wine). innoextract 1.4 worked for me (but I had to compile it from source, since current Debian testing still ships 1.2 which produces errors for current GOG packages):
Let's say you saved the package in $HOME/Games/install/gog/strike_commander
Code:
cd $HOME/Games/install/gog/strike_commander
innoextract setup_strike_commander_2.0.0.5.exe
Code:
rm -rfv tmp
Code:
dest_dir=$HOME/Games/strike_commander
mkdir -p $dest_dir
Code:
mv -v app/* $dest_dir
rm -rfv app
Code:
cd $dest_dir
rm -rfv DOSBOX *.dll
Note that the second file mounts an iso image for the game (SC.dat) as a virtual disk "D", and mounts the game directory as a virtual disk "C". We'll have to modify that to use Linux filesystem syntax (instead of Windows one). So we change mount C ".." to use correct absolute path as well as imgmount d -t iso -fs iso "..\SC.dat". To avoid confusion - it's not about changing C and D, that's internal DosBox (DOS) syntax and it's right. What's changing are native paths that are mounted. Windows uses backslashes: \ while Linux uses slashes: /. Plus adding absolute paths here is helpful for launching the game from some other directory, like with the launcher. You can do this change using some editor, or purely in terminal as follows (useful for some script automation):
Code:
sed_subs=`pwd`
sed_subs=${sed_subs//\//\\\/}
sed_subs='s/"\.\./"'$sed_subs'/g'
sed -i $sed_subs dosboxSC_single.conf
sed -i 's/\\SC\.dat/\/SC\.dat/g' dosboxSC_single.conf
Code:
dosbox -conf dosboxSC.conf -conf dosboxSC_single.conf