|
|
|||||||
| About Us | Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2008
Location: Norway
Posts: 3
|
native MacOSX support
Hi, I spent last few days trying to compile VBA-M under MacOSX and I'd like to share my findings to see if there is any interest among devs to officially support this in the main tree. At the same time, this can be seen as a sort of guide to compile VBA-M using native MacOSX SDL.
As a premise, I know that the compilation under Mac using macports libSDL is possible. And I want to thank ashaw, peterb and all the devs for the efforts put in making a real cross platform emu. Anyway, I personally keep thinking that using X11 SDL on Mac is a bit of cheating ![]() So, what if I want to compile VBA-M with Mac SDL? well, let's simply try to do a Code:
make The first issue you can encounter is with libpng. This library, indeed, is not installed by default in Mac and therefore the compiler would complain about a missing png.h. Anyway, this can be solved by simply downloading, compiling and installing Mac libpng. No exoteric knowledge needed. The second issue is a bit more problematic (and it's the only real issue with compiling VBA-M under Mac). Indeed, VBA-M compilation does use sdl-config and there is no sdl-config in Mac SDL. This is a design choice of SDL developers, and they also offer a (sort of) solution: either use Xcode (something I'd like to avoid) or include SDLMain.m/.h in the source. In a sense, programs requiring sdl-config to be compiled are not supposed to work under MacOSX, and they only work relying on the X11 compatibility. The SDLMain path is often followed by Mac programs (emulators as well, e.g. SDLMAME) and it's the one I decided to use in my building process. It consists in adding to the source the files SDLMain.m & .h (possibly editing the #include headers if you put them in a different directory than src/ ) and in adding the following line in the Makefile Code:
LFLAGS=-lz -lpng -I/Library/Frameworks/SDL.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers SDLmain.m -framework SDL -framework Cocoa -framework OpenGL Finally, there is another small problem with the strip part, when the executable has the symbols stripped out. Indeed, under Linux the command Code:
strip -s In conclusion, I would like to know if developers are interested in adding the SDLMain.m/.h files to the source and adding the corresponding line to the Makefile as an opton at compile time. Otherwise, anyone interested in obtaining a native VBA-M could always follow the above steps to self compile it
|
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Dec 2007
Location: New-Orleans
Posts: 46
|
Hmmm
It looks like ashaw managed to build the SDL port on MacOS X without adding any extra file : http://forums.ngemu.com/vba-m/98452-...ml#post1256321 |
|
|
|
|
|
#3 (permalink) | |
|
Registered User
Join Date: Mar 2008
Location: Norway
Posts: 3
|
from the post you linked:
Quote:
for people already using Mac SDL for other stuff, it would mean to install 2 different versions of the same libraries... |
|
|
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Mar 2008
Location: Norway
Posts: 3
|
right now I'm really busy at work, so I don't think I could offer much more than a bit of feedback in case of regressions in the svn repository. once I'm done with my present deadlines, who knows...
moreover, the only things needed at the moment (until I have time to install Qt and test the GUI) are: * the addition of the SDLMain (but would other devs agree? I recall there were already various discussions about the dependencies folder... I wouldn't like to piss off anyone) * the addition in Makefile of a building option to choose between Darwin and the native Mac SDL (but Nach is the Makefile god, so it would be better to ask him for a clean solution )
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|