VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Thanks to the generosity of the authors of DOSBox and other experts in the code, I've been able to create a custom build of the Windows version, with changes that improve its treatment of VGA text.

I've searched the board for any advice on how to create a custom build for OS X, but I haven't found any. As far as I can see, only two people have recently created custom builds for OS X, and I think the job probably requires far more expertise than I have. But if anyone knows a fairly straightforward way to create a custom build for OS X, I would be very grateful.

I hope to make a custom build that is based on @TeaRex's project, which he kindly let me have, with further changes to two or three files.

Thanks for any advice (even if it's "Don't even try").

Reply 1 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I think I summed it up in previous posts about compiling on OS X. Get macports, install the needed libs through that (if you are on Snow Leopard make sure you install everything as universal), make sure you set it to compile a 32bit arch (if you are on Snow Leopard this is important) (Buidling CVS on OS X 10.6.1) and off you go.

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 2 of 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

You summed it up very thoroughly, as far as I can tell! Thank you.

If there is any chance you could someday post a step-by-step guide on the Wiki, I'd be very grateful. Your post is probably all that an experienced expert will need, but some guidance about which libraries to download, where to put them, etc., would be very helpful.

I realize that i'm asking for a lot of work and a lot of time, so of course there are no hard feelings if you ignore this!

Reply 3 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

As I wrote the best way is to use macports. I forgot to mention but you can just use macports to install dosbox. "port install dosbox"
this will pull in all necessary libs and install/compile them in universal (meaning both 32 and 64bit) and compile dosbox 0.73 (yes they should update their port but that would require someone like me to file a ticket). Once this is done you can also compile current dosbox or svn with the above mentioned settings for 32bit compile (and any patches you want to apply).

You could do it all manually but this is a drag and would require massive instructions. I've done this for providing Exult OS X snapshots but unless you really know what you are doing don't bother.

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 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

I forgot to mention but you can just use macports to install dosbox. "port install dosbox" this will pull in all necessary libs and install/compile them in universal (meaning both 32 and 64bit) and compile dosbox 0.73 ... Once this is done you can also compile current dosbox or svn with the above mentioned settings for 32bit compile (and any patches you want to apply).

That's exactly the information I needed. I'll work on this over the weekend and report back. Thank you again.

Edit: Just to make sure I've got this right, the two things I need to change to get this to work are: (1) add the code that you mention to the MacPorts port file for DOSBox (the code that begins "if {$build_arch == "x86_64"} { "), and (2) set the environment variables that you list in another message in the same thread. Is there something else that I'm missing?

Reply 5 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

No, you gotnit wrong.
You don't mess with macports, just "port install dosbox" (in terminal)
Once that is done, you can compile dosbox by setting the environments variables in terminal cd to the folder where you put dosbox 0.74/svn sources then you apply the patches, autogen, configure and make dosbox.

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 7 of 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

... just "port install dosbox" (in terminal)
Once that is done, you can compile dosbox by setting the environments variables in terminal cd to the folder where you put dosbox 0.74/svn sources then you apply the patches, autogen, configure and make dosbox.

OK, I've done all the following:

I installed MacPorts and let it update itself; I did "port install dosbox" (and this installed a compiled dosbox 0.73 as /opt/local/bin/dosbox). Then I put the 0.74 source into a folder of its own. Then I navigated to the folder in the terminal, ran "./autogen.sh", "./configure" and "make" - and got dozens of miscellaneous errors.

The one thing I didn't do is "apply the patches" because I don't know what patches you mean. Do you mean "then you apply the patches that you want to use to modify the source"? Or do you mean "then you apply patches that must be applied before building in OS X, but which you don't know about?"

I'll be grateful for any clarification. Thanks again!

Reply 8 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Did you set the environment stuff?

And with applying patches I refered to that you wanted a customized dosbox. If you just want 0.74 on osx, you can download it from dosbox.com

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 9 of 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I experimented with 0.74 release source just to see if everything was working. I also tried building the 31 October SVN source found here:

http://source.dosbox.com/dosboxsvn.tgz

Here are the environment variables that I used, copied from your post in the other thread (Buidling CVS on OS X 10.6.1), but with line breaks added (I keep this in a text file for convenience):

CFLAGS='-O2 -arch i386' 
CPPFLAGS='-I/opt/local/include'
CXXFLAGS='-O2 -mdynamic-no-pic -arch i386'
MACOSX_DEPLOYMENT_TARGET='10.6'
CXX='/usr/bin/g++-4.2'
F90FLAGS='-O2 -m32'
LDFLAGS='-L/opt/local/lib'
OBJC='/usr/bin/gcc-4.2'
FCFLAGS='-O2 -m32'
INSTALL='/usr/bin/install -c'
OBJCFLAGS='-O2 -arch i386'
FFLAGS='-O2 -m32'
CC='/usr/bin/gcc-4.2'

I carefully copied these from a text file and pasted them into the terminal, and then ran "set" to make certain they were entered correctly.

Before posting this, I went to the SVN source folder, entered the variables in the terminal, and then entered:

./autogen.sh
./configure
make

The first two commands completed with no errors.

The output from make was very long, so I've captured it to a text file, and posted it here:
http://dl.dropbox.com/u/271144/makeoutput.txt

I think I've done everything you said, exactly as you described it. If there's anything obvious that I've missed, I'll be very grateful to know about it. I've tried to document completely what I've done and what the results were, but please tell me if I've omitted any information.Buidling CVS on OS X 10.6.1

Last edited by emendelson on 2010-12-05, 16:00. Edited 1 time in total.

Reply 10 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

just to make sure, you are using the same terminal window, right? Also you need to set the environment settings BEFORE running autogen and configure.

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 11 of 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

First, I just tried it again with pure, untouched, newly-downloaded 0.74 release source, and I was able to make 0.74 release dosbox successfully (I was trying yesterday with source that I had messed with earlier). So the problem I've having is with the SVN source, not with your instructions, which were perfect.

Second, yes, my procedure is this:

1. open a terminal
2. paste in the environment vars
3. with the same terminal still open, cd to the dosbox folder
4. ./autogen.sh, ./configure, make

So this procedure does work with release 0.74 source, but not with the SVN source that I've downloaded. I think this means I can patch the two files I want most to modify and maybe get a build that does what I need. I'll try this and report back. Meanwhile, (1) thank you for giving the instructions I needed and (2) I hope the output of the make command may be of use to someone who's working on the code.

P.S. Have you tried compiling the 31 October svn source on OS X? Can you get it to build?

Reply 12 of 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Update:

I just downloaded what I think is the latest source from this link:

http://dosbox.svn.sourceforge.net/viewvc/dosb … trunk/?view=tar

And this compiled successfully, unlike the 31 October snapshot that I was using earlier. So I'm on my way to getting this right.

A thousand thanks for your patience and your help!

Reply 13 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I was about to write that I was able to compile most recent source 😀 (though I did get some errors/warning in the autogen phase)
Btw, if you plan to use SVN more often, grab it via SVN.

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 15 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

SVNX is a good GUI for SVN on OS X http://code.google.com/p/svnx/ (I especially like the feature of easily going through revisions and reading the commit messages...)

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 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for that - and now one (I hope) last question:

When I build from patched SVN source, I end up with an executable half the size of the distribution one (3.3 MB instead of 6.8 MB). The custom build does everything I want it to do. But what is omitted from the custom one (if anything)?

Reply 18 of 51, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

some libraries linked in or not, or universal vs one platform

Thanks! So I should probably just experiment to see how portable this is to other systems. (And probably I should recompile with the deployment target set to 10.4 instead of 10.6 before I try that...)

Reply 19 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Making it portable is some really different beast. Apple does everything it can to not allow building a static binary. You will need to manually edit makefiles for this.
This is also the reason for the smaller binary., the libs are not compiled into the binary...

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