What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Dec 05, 2008 by bushing
Labels: Build
MacOSX_Build  
How to build dolphin in Mac OS X.

How To build dolphin on mac osx

In 32 bit

You need :

  1. Xcode
  2. MacPorts for other dependencies
  3. nvidia cgtoolkit to compile video plugin (http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0015/Cg-2.0_May2008.dmg)
  4. SDL framework : http://libsdl.org/download-1.2.php

All of the following steps happen inside Terminal.app.

Modify the PATH :

If you did not already do this as part of the MacPorts install, add /opt/local/bin to your path:

$ export PATH=/opt/local/bin:$PATH

Install dependencies using MacPorts:

Many of the dependencies needed to build Dolphin can be installed using MacPorts. Note that this will result in a binary that will only run on your system, or will require MacPorts in order to run (so don't go and try to redistribute it).

$ sudo port install libao cairo scons wxwidgets glew

Get dolphin sources :

$ svn checkout http://dolphin-emu.googlecode.com/svn/trunk/ dolphin-emu-read-only

Compile it using scons:

$ cd dolphin-emu-read-only
$ scons

Compile it using Xcode:

(tbd)

Launch it :

Open finder and go to Binary/mac directory and launch Dolphin.

Do not launch Dolphin from the Terminal, or else wxWidgets will not work correctly (?!)

You can also build the NoGui version, which will not crash when run directly.

In 64 bit

To build dolphin in 64bit you need :

  1. g++ (from xcode)
  2. nvidia cgtoolkit to compile video plugin (http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0015/Cg-2.0_May2008.dmg)
  3. libglew : macport version is 32bit, download sources from sf.net and add "-arch x86_64" as compilateur and linker flags (http://glew.sourceforge.net/)
  4. scons (from macport or official website)

Get the source with svn

Type : scons osx64=true

If your video card not support Ogl > 1.3, you can use software renderer (see cocoaGL.m in video gl plugin)

JIT not work in 64bit, and some plugins can't be compiled, use this in dolphin.ini :

GFXPlugin = Plugins/libzeroogl.so

DSPPlugin = Plugins/libdspnull.so

PadPlugin = Plugins/libpadsimple.so

WiiMotePlugin = Plugins/libPlugin_Wiimote.so

UseDynarec = False


Comment by skarmiglione.sk4r, Aug 01, 2008

for mac in ppc? i have a question, is more easy the emulation of gamecube on a mac in powerpc hardware? have the same type of processor, ej: Power G5. that is my ask.

Comment by hrydgard, Aug 08, 2008

Well, maybe a little bit easier if we started from scratch, but now we have quite fast PowerPC emulation code for x86.

You can't just run the code directly, you have to translate all memory accesses and so on. As a result it may not be all that faster, but of course things like flag calculation would be easier.

Comment by kevin.balouch.chr, Aug 13, 2008

When i try to complie it just says it: svn checkout http://dolphin-emu.googlecode.com/svn/trunk/dolphin-emu-read-only -sh: svn: command not found

Comment by Mushroomkid8, Aug 14, 2008

I cant install the ports. It says that MacPorts? returned error 77 and the c compiler could not create executables. i looked on google for a fix to this but i couldn't find it Could Someone help please?

Comment by skarmiglione.sk4r, Aug 17, 2008

it compile on a ppc?

Comment by madley.maddles, Sep 06, 2008

Up until the latest revisions Dolphin compiled under OS X. Now it just throws back an error.

g++ -o Binary/mac/Plugins/libpadsimple.so -dynamiclib Source/Plugins/Plugin_PadSimple?/Src/main.os -LSource/Core/Common/Src -LSource/Core/DiscIO/Src -LSource/PluginSpecs? -LSource -LSource/Core/Core/Src -LSource/Core/DebuggerWX/src -LExternals/Bochs_disasm -LSource/Core/VideoCommon?/Src -lcommon Undefined symbols:

"XPending", referenced from:
X11_Read?(int, SPADStatus) in main.os X11_Read?(int, SPADStatus) in main.os
"
XNextEvent", referenced from:
X11_Read?(int, SPADStatus) in main.os
"XAutoRepeatOff", referenced from:
X11_Read?(int, SPADStatus) in main.os
"
XAutoRepeatOn", referenced from:
X11_Read?(int, SPADStatus) in main.os
"XLookupKeysym", referenced from:
X11_Read?(int, SPADStatus) in main.os X11_Read?(int, SPADStatus) in main.os
ld: symbol(s) not found collect2: ld returned 1 exit status scons: [Binary/mac/Plugins/libpadsimple.so] Error 1 scons: building terminated because of errors.

Comment by madley.maddles, Sep 08, 2008

All fixed in r479. Thanks.

Comment by madley.maddles, Sep 08, 2008

Also should say that Dolphin cannot be compiled as a PPC app as far as I can see. Tried it and it just gave me gobbledegook.

Comment by siddyrocks, Sep 30, 2008

Annoying!!!!! >< There are WAY too many dependancies. Firstly note that upon first attempt if failed, just insert the command "sudo" just before and you have admin privileges (that got me a bit farther, seeing as how var is always protected. Then libao fails for unknown reasons, cairo is dependent on freetype and scons depends on python source script :S How is the average, or even the mid-range user meant to do this??? HELP!!!!...

And the dolphin sources aren't even available on that server anymore :'(

Comment by nicgilbe...@hotmail.com, Oct 05, 2008

The dolphin sources are still availlable, the good command to get them is : svn checkout http://dolphin-emu.googlecode.com/svn/trunk/ dolphin-emu-read-only There is a space caracter needed before 'dolphin-emu-read-only'. I've got the good command from the linux building page.

Comment by reejinbouk, Dec 12, 2008

on the step "$ scons" get error - there's n't this command.

Comment by superartstudio, Dec 13, 2008

A lot of linking errors:

scons: building associated VariantDir? targets: Build/Darwin-i386 Linking shared Binary/Darwin-i386/Plugins/libPlugin_VideoOGL.dylib Undefined symbols:

"cgGLGetLatestProfile", referenced from:
Renderer::Create2() in Render.os Renderer::Create2() in Render.os
"
cgDestroyProgram", referenced from:
PixelShaderMngr?::CompilePixelShader?(FRAGMENTSHADER&, char const)in PixelShaderManager?.os VertexShaderMngr?::CompileVertexShader?(VERTEXSHADER&, char const)in VertexShaderManager?.os
...

I've installed all the stuffs above. I'm a Macbook Pro user, with 9600M GT. I assume that there's something wrong with that "nvidia cgtoolkit" but I don't know what to do (a newer version is needed or what?), please help. Thanks a lot.

Comment by superartstudio, Dec 13, 2008

I even tried 'sudo scons' but not help at all, FYI.

To reejinbouk: make sure your "sudo port install xxx..." cmd is executed successfully. Run it again and again if you cannot fetch the src successfully.

Comment by superartstudio, Dec 13, 2008

Follow-up: I've installed cgtoolkit 2.1 nov2008 and the error still exists. T.T

Comment by superartstudio, Dec 15, 2008

I think the reason may be that the cgtoolkit is not installed properly, and libCg is not installed, because I cannot find libCg.lib or libCg.dylib in my computer. But /usr/bin/cgc is installed so I really don't know what to do :( Can someone running it on OS X gimme some hint?

Comment by starfox5...@snet.net, Dec 15, 2008

Hey superartstudio. If you join the new dolphin forums http://www.dolphin-emu.com/newdesign/news.php there is a thread dedicated to mac osx related problems. for some reason i am not able to register at that site. (not getting activation email=p)

Anyways... I have OSx86(the only difference is a few hexstrings for audio and gfx ability same kernel etc.) installed on my PC and was able to get a revision to compile in mac.

It was a little while before all of the fixed revisions were out.

however, It had a terribly large amount of crashing (I couldn't even select a iso/gcm)

I suggest restarting from scratch with macports. this was where all of my problems were coming from before. look online to learn how to delete it. it involves rm -rf /opt/local directory (don't worry this process is pretty safe as long as your directory is /opt/local/)

Try it out and tell me how it goes (to avoid spamming up this part of the wiki, we should talk by email it is the same one as my gmail username)

Comment by superartstudio, Dec 15, 2008

Thanks, I've moved to this thread: http://www.dolphin-emu.com/newdesign/forum/viewthread.php?thread_id=27&pid=103#post_103

If anybody here has the same problem, let's discuss in that thread. If you're looking for a solution then please also check the above link, hope it can be fixed recently :)

Comment by fudduckz, Dec 20, 2008

Hi. It seems that every command works for me in the 32 bit installation except for:

"$ sudo port install libao cairo scons wxwidgets glew"

It keeps spitting back: "sudo: port: command not found"

I tried looking for the dolphin application on my hard drive, just to see if it would run without this command, but only the folders and other files exist, so.. I don't really know what to do from here. Please help! Thanks!

Comment by superartstudio, Dec 20, 2008

Hi fudduckz, you need to install macports first, and then set your system path. The detailed instructions are described in the beginning of this page.

BTW, since padsimple is not available in OS X, and I don't have a joystick, is there anyway I can run dolphin? (Sorry post it here but seems the forum is down, got a 404.)


Sign in to add a comment