VOGONS


First post, by SlimG

User metadata
Rank Newbie
Rank
Newbie

My Goal:

  • Launch a game from any platform with default dosbox
    settings, and without having to edit files when moving
    the game between platforms and paths.
  • Launch a game using only one path as argument to dosbox

Example game:
/dir/cg/dosbox.conf
/dir/cg/coolgame.exe

  1. dosbox -conf /dir/cg/dosbox.conf /dir/cg/coolgame.exe
    The problem: This would launch the game, but requires two path arguments, and thus is of no use.
  2. Adding the following to /dir/cg/dosbox.conf:
    [autoexec] MOUNT C . C: coolgame.exe […]
    Show full quote

    [autoexec]
    MOUNT C .
    C:
    coolgame.exe

    before running
    dosbox -conf /dir/cg/dosbox.conf
    The problem: This would only work if I run dosbox from within /dir/cg/

What I would wish for, is a variable named %CONFDIR% that would return the real directory of the current config file, so this would be the working sollution:

Adding the following to /dir/cg/dosbox.conf:

[autoexec] MOUNT C %CONFDIR% C: coolgame.exe […]
Show full quote

[autoexec]
MOUNT C %CONFDIR%
C:
coolgame.exe

before running […]
Show full quote

before running

dosbox -conf /dir/cg/dosbox.conf

Another way of solving this would be to change the default behaviour of dosbox to allways check for dosbox.conf before executing.

Reply 2 of 2, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

In other words, you want a command like this:

MyMagicDosbox /dir/cg/

that will execute the command

dosbox -conf /dir/cg/dosbox.conf /dir/cg/coolgame.exe

Now.... How hard can it be to write a program/script called MyMagicDosbox that will change the working directory to /dir/cg and execute the above mentioned command?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32