Porting XBMC to Mac OS X (Leopard) - Developers only! - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Porting XBMC to Mac OS X (Leopard) - Developers only! (/showthread.php?tid=30074) |
- ezar - 2008-01-02 xbmc.log Quote:02:56:43 T:2693680992 M:813555712 NOTICE: Mapping drive Q to /Users/ezar/Documents/SVN/XBMC/BUILD - ezar - 2008-01-02 Finally I test XBMC-OSX I use only macports.org releases... For libsdl I modify portfile to use 1.2.13 (relased 12-30-2007) I create a ticked to macports to include it! More detail in user forum Working on OpenGL - elan - 2008-01-04 I think the easiest way to move forward on this problem (which is preventing video and photos from working) is to move to using SDL 1.3. This newer version supports the following calls: SDL_GL_CreateContext SDL_GL_MakeCurrent SDL_GL_DeleteContext Which should help in converting the GL code over to OS X. The main problem is that SDL/OS X actually uses Cocoa, so I can't use the AGL calls, which are deprecated and Carbon based. I could use CGL calls too, which are the basis of the higher level GL APIs on OS X. (Of course, I'm writing this right now and I did all the research in the middle of the night when I couldn't sleep, so I may have dreamt most of it.) Also, I have a basic Eclipse project working, which uses xcodebuild to do the actual building. Error parsing works fine, and that means that XCode and Eclipse development can proceed alongside each other, and we don't have to force anyone into using one or the other. Debugging is much better with Eclipse, at least for me. The standard Makefile/CDT builders in Eclipse are some buggy crap, let me tell you, which is another reason I moved to simply invoking XCode's builder. -elan Baby steps - elan - 2008-01-04 Alright, I'm now using SDL 1.3, and got the basic OpenGL context stuff in there. It almost works, no more crashes, but now seemingly hitting a deadlock, and things are far from perfect. But at least it displayed the first image from a slideshow. - laserheart - 2008-01-04 Thank you all for your efforts! This is awesome! - griffore - 2008-01-04 elan Wrote:Alright, I'm now using SDL 1.3 Do you mean SDL 1.2.13? I can't find any reference to 1.3. :confused2: Seek and yea shall find - elan - 2008-01-04 griffore Wrote:Do you mean SDL 1.2.13? I can't find any reference to 1.3. :confused2: SDL 1.3 is here. There's been a lot of work done on OpenGL/OS X/Cocoa, but I'm not entirely convinced this is the right route to take. I may go back and hack 1.2.13 more. Back to 1.2.13 - elan - 2008-01-05 I'm basically back to a slightly hacked SDL 1.2.13 and using AGL calls in XBMC's CSurface. I can now create and manage AGL contexts fine, and now I'm running into a critical section issue that I was aware of when first porting, but now seems to be actually biting me when I go to display a photo Hopefully I'll get a chance to work on this more later on today. -elan - gmackenz - 2008-01-06 I am curious how are either of you able to compile SDL with Leopard...I've tried with both SDL 1.2 and 1.3 and had make errors. Obviously neither fink nor macport support libSDL with 10.5.x just yet. Is it possible to put online somewhere (if not in this discussion) where you got 1.2.13 and how you modified it ( I assume there where changes made to certain of the make files)? Never mind - gmackenz - 2008-01-06 gmackenz Wrote:I am curious how are either of you able to compile SDL with Leopard...I've tried with both SDL 1.2 and 1.3 and had make errors. Obviously neither fink nor macport support libSDL with 10.5.x just yet. Thanks to a kind soul who sent me a private message, I'd gotten so forgetful in my middle-aged-mindness that I need to configure/compile as root for Mac OS X...Been using Fink/Macports too much Better documentation/current work-arounds in the README.mac_os_x is always appreciated. - elan - 2008-01-06 gmackenz Wrote:Better documentation/current work-arounds in the README.mac_os_x is always appreciated. Yeah, next time I come up for air in my development work, I'll improve the documentation. The more people who are able to build it, the more people who are able to help out in the porting effort. -elan Photos work! - elan - 2008-01-07 I ran a slideshow with music for 3 hours while I was out for dinner, and it worked perfectly. The key was getting the AGL contexts working, rewriting the critical section code to use standard pthread constructs, and hacking SDL 1.2 to return me the Carbon WindowRef. I have one interesting display glitch (title bar is garbage), and I'm pretty sure it's because I'm using the top-level WindowRef instead of the subframe I should be using. I'm brand new to Carbon/Cocoa/Quartz/AGL coding, so hopefully you'll cut me some slack while I figure out how to fix it - petsounds - 2008-01-07 Superb work, elan. Are you planning to stick with Carbon/Eclipse at this point? I know that Apple has deprecated the Carbon and QuickDraw libs, and highly recommends that people move to a pure Cocoa environment. They also recommend using XCode because it will be easier to maintain the codebase going forward as things evolve. Less significantly but still something to note, under 10.5 Carbon apps have no support for 64-bit. Of course, if you're feeling really crazy you can mix Cocoa into a Carbon app (http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/Articles/WrapperFunctions.html) or vice versa. Aside from the great Apple Developer (developer.apple.com) site, this is also a good resource for learning Cocoa: http://cocoadevcentral.com/ - elan - 2008-01-08 petsounds Wrote:Are you planning to stick with Carbon/Eclipse at this point? I know that Apple has deprecated the Carbon and QuickDraw libs, and highly recommends that people move to a pure Cocoa environment. They also recommend using XCode because it will be easier to maintain the codebase going forward as things evolve. Less significantly but still something to note, under 10.5 Carbon apps have no support for 64-bit. Thanks for your kind message. In terms of Eclipse, I've configured it to call xcodebuild externally, so XCode manages the configuration. This seemed the best of both worlds, because Eclipse works fine, highlights errors, etc., and the debugging (for me, at least) works much better. The people who want to use XCode are set, and the people who want to use vi or emacs can use xcodebuild. In terms of Carbon etc., XBMC is built on top of SDL, which in 1.2 is Cocoa/Quartz, and 1.3 seems to be just Cocoa (assuming I know what I'm talking about). In getting multiple OpenGL contexts to work, this first attempt uses AGL which needs access to a Carbon WindowRef. Since I already have a tiny bit of Obj-C in XBMC, I could probably move to a pure Cocoa implementation, I just haven't been brave enough to do that yet. AGL seemed to provide the easiest way forward, although, to be fair, there is that graphical glitch in the titlebar which would probably be solved if I went to using Cocoa's OpenGL API. -elan Visualizations - elan - 2008-01-09 Mmmmm, tasty, got ProjectM (which can read Milkdrop settings) mostly working. |