• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 9
Porting XBMC to Mac OS X (Leopard) - Developers only!
#1
Star 
I've begun porting the code over to Mac OS X 10.5.1, because I'm annoying at how crappy Front Row is, and I've been wanting to use my Mac as a media center. I will have the TV connected to the second DVI port, so I can't just install Linux Big Grin

Anyway, I've gotten to the point where the code compiles and almost links, but I'm missing some libraries that come already compiled for Linux, like libXBMS, libshout, librtv, etc. I presume I should build them from the trunk code XMBC/sources/ directories?

So far the port is progressing fairly smoothly. The one hurdle that I haven't solved yet is thread local storage, as OS X doesn't have support for the __thread directive. I'm planning to use Portaudio for sound.

I'll post more as I find the time to make more progress.

-elan
Reply
#2
A few more questions to those in the know:

* Mac SDL doesn't use X11. Is that going to be an issue?

* I'm trying to build libGoAhread from xbmc/lib/libGoAhead, and I can build what's in there, but it seems to be missing lots of stuff (e.g. all the um* stuff and the ej* stuff). Any pointers?

Thanks!
Reply
#3
Ooo, getting closer...however, it's time for bed!

Available videomodes:
Found mode: 1920x1200
Found mode: 1600x1200
Found mode: 1600x1000
Found mode: 1344x1008
Found mode: 1280x1024
Found mode: 1280x960
Found mode: 1344x840
Found mode: 1360x768
Found mode: 1280x800
Found mode: 1024x768
Found mode: 1024x640
Found mode: 960x600
Found mode: 800x600
Found mode: 848x480
Found mode: 800x500
Xlib: extension "XINERAMA" missing on display ":0.0".
Reading symbols for shared libraries . done
2007-12-12 00:38:44.748 XboxMediaCenter[54121:813] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
Constructing surface
GLX Info: NOT Using destination window
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
GLX Error: No Multisample buffers available, FSAA disabled
GLX Info: Using parent window
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 78 (X_CreateColormap)
Resource id in failed request: 0x9442e6f5
Serial number of failed request: 16
Current serial number in output stream: 18
Reply
#4
OK, now it's *REALLY* time for sleep.

Image
Reply
#5
Did I mention I have to work in the morning?

Image
Reply
#6
Cool stuff, keep it up Smile
Reply
#7
Thumbs Up 
You are using the Linux port branch in the SVN as your base, right? /xbmc/branches/linuxport/XBMC/
http://xboxmediacenter.com/wiki/index.ph...ource_code
Quote:svn checkout https://xbmc.svn.sourceforge.net/svnroot...xport/XBMC

Also, where did you get that skin, becuase I can tell from the logo in the top left corner that it is a relativly old version of the PM3 skin(!)

elan Wrote:I've gotten to the point where the code compiles and almost links, but I'm missing some libraries that come already compiled for Linux, like libXBMS, libshout, librtv, etc., etc. I presume I should build them from the trunk code XBMC/sources/ directories?
/xbmc/trunk/sources/ only contains the Xbox versions of those libraries, I think that you may want to /xbmc/branches/linuxport/sources/ instead for the Linux versions.

elan Wrote:Mac SDL doesn't use X11. Is that going to be an issue??
No, (niether does Windows and as you may know it is possible to build to/for Win32 and SDL from the Linux branch using Microsoft Visual Studio .NET 2003).

For ideas on how to build SDL using OpenGL for Mac OSX I suggest you refer to the documentation (Wiki) on http://www.libsdl.org

elan Wrote:I'm trying to build libGoAhread from xbmc/lib/libGoAhead, and I can build what's in there, but it seems to be missing lots of stuff (e.g. all the um* stuff and the ej* stuff). Any pointers?
In the SVN look in /xbmc/branches/linuxport/sources/libGoAhead/
...otherwise checkout http://webserver.goahead.com/webserver/webserver.htm


PS! If you like to chat with the programmers working on the XBMC Linux port then use an IRC client (like mIRC) to visit #xbmc-linux on freenode
....you may also sometimes find developers hanging out at #xbmc on freenode Cool
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
elan Wrote:A few more questions to those in the know:

* Mac SDL doesn't use X11. Is that going to be an issue?

* I'm trying to build libGoAhread from xbmc/lib/libGoAhead, and I can build what's in there, but it seems to be missing lots of stuff (e.g. all the um* stuff and the ej* stuff). Any pointers?

Thanks!

I can help you later on with that. for now just #undef HAS_WEB_SERVER and forget about it. SDL not using X11 is not an issue.

Good luck! Let me know if there's any commits that needs to be done to support OSX.

-Yuval
Reply
#9
elan Wrote:OK, now it's *REALLY* time for sleep.

Image

Fuck Broken OwningCiriticalSection I don't recall that debug message Laugh
Reply
#10
You push me out!!!Laugh

Well, i see that you have little problems, so count with me. The libraries maybe yhou can get them with fink, and no: OSX SDL doesn't need of X11 Wink You can compile it at the "unix way" from terminal and fink and other things (now Leopard has real support to this) or the "osx way" with XCode (that i preffer, but this will not be easy to port...). In any case there is an app that port from makefiles to XCode projects, look for it Wink
Reply
#11
this will be extremely popular, there are no decent media centers out there for osx.

thanks for taking the time out to port this, if you'd like anyone to test it i run

17" iMac intel core 2 duo
ati radeon x1600 (128mb vram)

and

Macbook intel core 2 duo
onboard x3100 Intel Video Card, (144mb vram)

both running OS X Leopard 10.5.1
Reply
#12
Gamester17 Wrote:You are using the Linux port branch in the SVN as your base, right? /xbmc/branches/linuxport/XBMC/

Yes, that's the one I'm using.

Quote:Also, where did you get that skin, becuase I can tell from the logo in the top left corner that it is a relativly old version of the PM3 skin(!)

Oh, that's funny. I didn't do anything to pick or checkout a skin, so it must be the default one that gets checked out on the Linux port branch? Where should I be getting it from?

Quote:/xbmc/trunk/sources/ only contains the Xbox versions of those libraries, I think that you may want to /xbmc/branches/linuxport/sources/ instead for the Linux versions.

Thanks, I'll use those!

Quote:For ideas on how to build SDL using OpenGL for Mac OSX I suggest you refer to the documentation (Wiki) on http://www.libsdl.org

Seems to be working great!

Thanks for the helpful information!

-elan
Reply
#13
Nice work, elan.

Let us know what modifications are going to be necessary once you've cleaned it up a bit - hopefully we can keep the code as portable as possible Smile

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#14
yuvalt Wrote:Fuck Broken OwningCiriticalSection I don't recall that debug message Laugh

Big Grin

Yeah, I need to figure out how to do TLS on OS X. I think I'll try to use pthread_setspecific...if this works, the Linux port could probably use this as well, so as to have exactly the same implementation, even though using __thread is so much easier.
Reply
#15
By the way, I've been treating the OS X target as sort of a sub-port of Linux, so I leave _LINUX defined and then do...

#ifdef __APPLE__
...
#endif

...since OS X is pretty much UNIX. In the long term, it may make sense to define something like _UNIX at the high level and then #ifdef for LINUX, OS X, etc.

I hope this is alright, it certainly made the port easier, but please let me know if this isn't seen as the right way of doing things. Where it made sense I have whole new subclasses for things (like the PortAudio player) that live alongside the Linux and Windows ones.

Anyway, I want to get my changes merged into the branch as soon as possible. I need to do a bit more work and get things working better first.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 9

Logout Mark Read Team Forum Stats Members Help
Porting XBMC to Mac OS X (Leopard) - Developers only!3