VOGONS

Common searches


First post, by StefSOFT

User metadata
Rank Newbie
Rank
Newbie

Hello guys and girls,

I'm trying to make a simple shell script which runs a dosbox instance and a custom configuration file.
The script currently looks like this:

#!/bin/bash
BASEDIR="$( dirname "$0" )"
cd "$BASEDIR"
open -a DOSBox --args -conf conf/preferences.conf

When running the script DOSBox opens, but still uses the preference file from ~/Library/Preferences/DOSBox 0.74 Preferences.

The last command in the script I got from this wiki page: http://www.dosbox.com/wiki/DOSBox_and_Mac_OS_X

The .conf file is a copy of the original preference file, with full screen changed to 'true' and some custom autoexec commands.
Anybody knows what I'm doing wrong?

Goal of this exercise is to make dosbox run with all the contents in it's own folder, so I can create multiple folders for different games and run them with a simple double click in OS X.

Last edited by StefSOFT on 2014-02-24, 13:57. Edited 1 time in total.

Reply 4 of 8, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Damn my answer got lost ;(

I wanted to point out http://www.dosbox.com/wiki/Mac_OSX_Advanced which has my AppleScript for doing that nicely 😉
You have your special configs in one folder and yo choose via doubleclick in the AppleScript GUI.

But your problem might be solved by entering the full path to the conf. Since you are starting from an App bundle relative paths get confused at times (hence why your other solution works)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 5 of 8, by StefSOFT

User metadata
Rank Newbie
Rank
Newbie

The goal indeed was to make it relative to only the game/dosbox folder. In that folder I created the start.command shell script, I'm able to run the relative conf file and mount the relative c-drive and cue file. Everything is now working as expected. Thanks for the link though, I will read into that.

Reply 6 of 8, by mr_space

User metadata
Rank Newbie
Rank
Newbie

Just a quick message for Dominus, thanks for the script! I use DosBox on a 2004 eMac, not having DBGL running in the background gives me free "power". I had to add a "/" somewhere , I also add a line to hide the .map files in the launcher.

Reply 7 of 8, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

💪 glad it helps and you got it working!
I‘m still using it all the time but don‘t know anymore if I needed to change things.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper