VOGONS


First post, by Joe Speroni

User metadata
Rank Newbie
Rank
Newbie

I have a DOS program (and associated files) that I would like to insert into the DOSBOX installation file and have it install on a user PC with the MOUNT and Config executed when DOSBOX is started.

Only my program would be executed when this "version" of DOXBOX starts.

The intent is to make it easy to use my program. Having a user install DOXBOX, go to my website and download my program and then modify the Config file is a bit intimidating for some users.

Is there a way to accomplish this?

Thanks for any suggestions!

Reply 1 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

yes there are multiple ways.

maybe download one of the free games of GOG.com for an example.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 19, by Joe Speroni

User metadata
Rank Newbie
Rank
Newbie

Thanks I did download a GOG game and assuming it runs under DOSBOX, it appears exactly what I'd like to have form my program.

Is there any technical explanation of how to do it? How can I created one EXE that contains DOXBOX and my program files that installs correctly?

I'm looking for a "how to" link.

Mahalo,

Joe Speroni
Honolulu

Reply 3 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Just look at ANY windows installer program. There are multiple programs to do that. Google something like make installer or make setup program.

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 4 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

And then use a preconfigured dosbox config file with the correct autoconf settings and make dosbox use that in its shortcut.

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 19, by Joe Speroni

User metadata
Rank Newbie
Rank
Newbie

To be able to make a windows installer after I embed my application into DOSBOX, I think I need all the registry information and files that go into App member. I have a windows installer and use if for other applications (Inno Setup Compiler), but I just don't see how I can make a new EXE to install a copy with my application without all the information on how to generate the registry entries. Is this DOSBOX information published somewhere?

Reply 7 of 19, by meowser

User metadata
Rank Newbie
Rank
Newbie

DOSBOX is very standalone which is nice... Alot of developers could learn some lessons from that 😀

In regards to packaging your application with it as a single EXE there are many "software installers" that exist however problems can arise depending on the platforms for deployment depending on if your application requires external libraries. A constant matter with stuff for example built in Visual C++ from Microsoft where the runtime package is required and may or may not exist on someone elses computer(s), versions of the runtime package etc.

The simplest thing to do is just use a tool such as Zip or Rar and create a self extracting archive. Thus your distributing an EXE that when run extracts everything. From there if you need you can have a setup program that completes installation such as creating whatall, desktop icons, start menu items etc.

Reply 8 of 19, by collector

User metadata
Rank l33t
Rank
l33t

There is no "embedding". DOS games/applications are pretty much stand alone. They do not make or use any registry entries. As Qbix said, neither does DOSBox. Out side of Windows games, the only registry entries that my installers make is just for the uninstaller. I am not familiar with Inno, but it should have "how to" information on its site on. NSIS has a a very deep Wiki with lots of information for all skills levels. It also has a very active forum. It has a large number of plugins and code examples. You can easily find everything you need to get you started. http://nsis.sourceforge.net/

Depending on exactly what you want to do, you can also do what was suggested of just zipping it. If you include your app in a subfolder of the DOSBox folder, you can use relative paths in a preconfigured dosbox.conf. If you want more flexibility, you can have the installer write the config file, based on where the user installs it.

Reply 9 of 19, by TeaRex

User metadata
Rank Member
Rank
Member

It's quite possible to compile DOSBox with all the libraries, except standard Windows libraries, linked into the executable. Look at the sdl-static project on Google Code, for example, for static versions of SDL & Co.

Also you can turn off some things that require external libraries while linking DOSBox, if you don't need those capabilities. For example networking and screenshot capturing.

Another thing that might be interesting to attempt would be to include the game's files and the config file *inside* a custom DOSBox executable, so that there is only a single EXE file that doesn't unpack to more than one file either, and that doesn't need any installation at all - kind of like what people did on the old Mac OS. But there are a number of problems with this:

1.) GPL. IANAL, but as I understand the GPL I think this amounts to linking, so that you'd have to GPL your game if you want to distribute the resulting single executable.

2.) If you want to support disk writing, i.e. saved games, you'll need at least one external file for that, and you'll probably have to do some major hacking to support it. Maybe use an embedded disk image and do some sort of "difference image", saving only the changed blocks to a new file.

3.) A config file might not work equally well on every system, as regards such things as the best video output= option.

tearex

Reply 10 of 19, by norolim

User metadata
Rank Newbie
Rank
Newbie

I managed to do exactly what the OP wanted to do, i.e. generated a setup.exe file, that installs a DOS game in WIn XP. It creates standard shortcuts on the desktop and in the Start Menu, that run the game in Win XP (through seamless use of DOSBOx of course). The only limitation I was not able to overcome was the install path. I had to rob the user of the setup.exe of the freedom of choosing the install path as I had to provide exact mount commands in the dosbox.conf file of the installation. As a result I had to make the setup install the game in a specific location. Is there a way to allow the choice of installation path? Thank you for any help.

Reply 11 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Yes, with a good setup program you can easily ask for install location and point the shortcut at that (or have the setup edit the conf file).

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 12 of 19, by norolim

User metadata
Rank Newbie
Rank
Newbie

Thnx for a quick answer Dominus Could you, however, by any chance be more informative, please? What setup program do you mean? What in it, should I be looking for? How to make setup edit the conf file? I used Install Creator to build my setup.exe and to be honest I did not find a way to do what I wanted there.If anyone else can help, please read my question two posts up. Thanks.

Reply 13 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Inno setup probably.

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 16 of 19, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This forum is for dosbox related things, not how you can/should configure your setup program.

By times the capability of using "mount c ." to mount the current directory is useful.

Reply 17 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
norolim wrote:

Ok. Thank you very much for your help Dominus. I can clearly see you are trying hard. Nevertheless I would appreciate some real info. Anyone please?

You're welcome, I see you are NOT trying hard. Just see what setup programs are available and try that. If it does more than just archive stuff and make a start menu it will probably have that feature. If you need holding hand see the forums of those programs.

Reply 18 of 19, by norolim

User metadata
Rank Newbie
Rank
Newbie
wd wrote:

[...] the capability of using "mount c ." to mount the current directory is useful.

Thank you. That's what I needed. I new this option was there. Just completely forgot it.
This solves the problem without having to learn how to script in Inno only to check if it offers the required function (the frontend for inno hasn't got it)

Reply 19 of 19, by collector

User metadata
Rank l33t
Rank
l33t

As wd said, this forum is for DOSBox, but NSIS can write the dosbox.conf on the fly, using variables populated at run time, like the installation directory chosen by the user. NSIS is what I use for my installers, most of which employ DOSBox. Not only do they allow the user to choose the installation folder, but also allow the user to choose any DOSBox already on their system. If none exists they can download and install it fro the user.

http://sierrahelp.com/Patches-Updates/NewSier … Installers.html

Perhaps a mod can move this thread to a more appropriate forum.