VOGONS


First post, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Hi all,
since I've upgraded to 10.6.1 Snow Leopard, I have had many problems with buiding any open source stuff. Since now all the SDL libs (SDL itself, mixer, net, image..) build fine on 10.6.1 I am now semi able to build Dosbox.
That means I cannot make it build on my own through ./configure but need to trick the MacPort port file to build a 32-bit version of Dosbox CVS.

After coreaudio was fixed in CVS the only problem I had was with the inclusion of malloc.h in libserial.cpp. When I exchanged that include with stdlib.h it finished building. I opened a bug report in the tracker about this.

My question, when I try to build Dosbox on my own how can I make the compile be a 32-bit one?
I really need help since I'm not good at real coding, just with messing with stuff, that not always leads to the desired goal 😀

by adding these lines to the macports port file for dosbox I was able to make it build a 32bit version:

if {$build_arch == "x86_64"} {
configure.build_arch i386
} elseif {$build_arch == "ppc64"} {
configure.build_arch ppc
}
if {[variant_isset universal] && [string match *64* $universal_archs]} {
pre-fetch {
return -code error "$name $version cannot be built for 64-bit architectures"
}
}
Last edited by Dominus on 2009-10-10, 09:49. Edited 1 time in total.

Reply 1 of 13, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

After coreaudio was fixed in CVS the only problem I had was with the inclusion of malloc.h in libserial.cpp. When I exchanged that include with stdlib.h it finished building. I opened a bug report in the tracker about this.

he he, this was not fixed after all, but just my local copy that was fixed 😀
I added a patch to the patch tracker for this 😀

Reply 2 of 13, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I needed toset the following environment variables to make it properly compile:
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'

so, now I'm back in business of compiling Dosbox CVS 😀

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 3 of 13, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

thanks. Missed the notification for the patches as gmail put the sf.net emails in the spam folder.

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

Reply 6 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That's what autoconf checks are for, not? Besides that gcc 4.x (dunno what
version exactly) has gotten a header cleanup so you now have to specify the
exact header (might not be relevant here).

Reply 7 of 13, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

thanks. Missed the notification for the patches as gmail put the sf.net emails in the spam folder.

No problem, there was no hurry :)Even though gmail's spam recognition is quite good, I fond a couple of SF and mailinglist emails in the spam lately...

Is stdlib.h more cross-platform than malloc.h? Then I'd just use that.

dunno, just googling malloc.h os x was giving me the option to either specify the full path to malloc.h, delete the include or, for better compatibility, to replace it with stdlib.h. Setting the full path and deleting it didn't make it compile, replacing it did 😀

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 13, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

grrrr... on OS X, the German keyboard layout doesn't seem to want to work correctly. \ is not happening, the combination of alt+strg+ß doesn't work 🙁
(SDL issue most likely...)

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 10 of 13, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

another issue I have run into with the CVS:

When I run Windows 3.1x above 256 colours, the colours have an heavy orange tint. The release version of dosbox 0.73 does not have this issue. I'l try now if this is an issue of Snow Leopard compiled versions or if this is a general CVS issue...

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 13, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Here is a nice apple script that lists all my dosbox config files in a directory and lets me choose one for starting Dosbox with (if I don't choose one, but hit cancel, then I'm starting Dosbox without specifying the config file, thus starting it with the default). Very convenient for someone like me who doesn't want to use frontends 😀

set the_list to ""
set nl to ASCII character 10
tell application "Finder"
set file_list to name of every file of folder "Macintosh HD:users:dominus:documents:dosbox" whose name ends with ".conf"
repeat with entry in file_list
set the_list to the_list & nl & entry
end repeat
end tell
set optionen to (choose from list file_list with prompt "DOSBox plays today")
if optionen is not false then
do shell script "/Applications/DOSBox.app/Contents/MacOS/DOSBox -conf /users/dominus/documents/dosbox/" & optionen as string
else if optionen is false then
do shell script "/Applications/DOSBox.app/Contents/MacOS/DOSBox"
end if

This uses the official release of Dosbox (my own copy points to the CVS version of Dosbox).
If anyone wants to use it on their own machine, you need to adjust paths in the lines

set file_list to name of every file of folder "Macintosh HD:users:dominus:documents:dosbox" whose name ends with ".conf"

and

do shell script "/Applications/DOSBox.app/Contents/MacOS/DOSBox -conf /users/dominus/documents/dosbox/" & optionen as string

Maybe if I have time, I'll add this to the Wiki for advanced Mac usage 😀

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

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Just added a cleaned up version of this script to the Wiki at a new page I made for this http://dosbox.com/wiki/Mac_OSX_Advanced
I'm not sure whether this should just be in the OS X page...

And especially not sure whether people will actually understand a word I wrote 😀