Common searches

First post, by Danicela

User metadata
Rank Newbie


I would want to make an "all in folder" for Linux Dosbox.

I mean a Dosbox install that would work immediately if I move the folder from a computer to another, with all dependencies included in the folder.

The Windows version already work when you send the folder to another computer, but Linux's version installs libs in /usr/share folder and doesn't work if you move the dosbox binary to another computer.

What version should I use / what should I do to get this 'transportable' linux Dosbox version ?


Reply 1 of 3, by bloodbat

User metadata
Rank Oldbie

Shared libraries work differently under Linux than under Windows; so, for starters, look here:
http://serverfault.com/questions/279068/cant- … -the-executable
Executable paths also work differently (at least if running from a command line...), so, also, look here:
It's probably (IMO) not worth the hassle to pack everything...that's a lot of ldd and defiant of the Linux structure...but if you're so hellbent, after doing that you could write a shellscript that takes care of the above mentioned problems...

Reply 2 of 3, by ripa

User metadata
Rank Oldbie

I found my notes for a software project I did where I couldn't "install" anything on a Linux system, but I still had to have the software use some custom pre-built libraries. You could try downloading some pre-built dosbox packages like this one:

Extract the contents using:

ar vx dosbox_0.74-1_i386.deb

Extract the resulting data archive:

tar xvf data.tar.gz

You get a directory tree that includes the binary and other stuff like the manual. When you try to run the binary in usr/bin/, you'll probably get something like this:

./dosbox: error while loading shared libraries: libSDL_sound-1.0.so.1: cannot open shared object file: No such file or directory

Which libraries you need obviously depends on where you try to run the binary. You could download stuff listed as a dependency on that debian page and perform these same steps for each of the .deb archives. In the end you'll have your own directory tree with the libraries and all.

Finally, you need to set the LD_LIBRARY_PATH environment variable to point to where the libraries are before trying to run the binary. E.g., if you've extracted everything to /home/danicela/dosbox/, and you have bash shell:

export LD_LIBRARY_PATH=/home/danicela/dosbox/usr/lib

If there are multiple library paths, you need to add them all, separated by : (i.e., not semi-colon). You could write some small shell script that sets this environment variable correctly and then runs dosbox. Finally, just ZIP up this directory tree.

Reply 3 of 3, by megatron-uk

User metadata
Rank Oldbie

Better off compiling a static version of the dosbox binary, IMO. Then your resulting dosbox executable shouldn't have any external dependencies other than the basic c libraries - you then won't have to have install them all on whichever system you plug your usb stick/card/flash drive in to.

My collection database and technical wiki: