View Full Version : [MAC] How about a clean Mac OS X build system (Xcode project)?
Hi there,
I've discovered XBMC not so long ago. And it litterally blew my mind. It's just too far ahead of the competition :)
Being a developper myself, I thought I might help at some point. So I downloaded the sources off of the SVN server, and decided that I would try building XBMC. I've quite an extensive background in OSX programming, so I was very pleased to see an Xcode project file ! But... well, I have to say, I've never seen such an ugly Xcode project :-) only script phases, used to call into Makefiles ? Ewwww :D
So, it took me two full days, but I eventually managed to write a clean Xcode project. No Makefile, very minimal and properly named script phases, no call to "./configure", etc...
At this point though, I just got my first binary of XBMC. It's still pretty dirty, (as I said, it took me two whole days. So at the end I kinda "cut around the corners" because I really wanted to get that binary), but it should be really straightforward to clean.
Anyway, I really wanted to share that with you, so please give me your feedback on this "All in Xcode" patch (http://www.likid.org/public/XBMC_ALL_IN_XCODE.patch) . Once again, I know it's really young, and it's not (yet ?) intended to be a drop-in replacement for the current build system. Please only judge the overall "new" architecture.
So, how do you use this patch ?
1/ Install Leopard (not tested on Tiger yet. I think it wouldn't work out of the box, but it should be pretty easy to get things working on Tiger)
2/ Check out SVN ToT
3/ Apply patch
4/ Install MacPorts
5/ "port install lzo bzip2 libSDL libSDL_image libSDL_mixer ffmpeg+postproc+gpl mysql5 libmad libogg libvorbis fribidi boost pcre glew" (I hope I'm not missing any) .Any mising port will cause a red item in Xcode, which is really convenient :-)
6/ Press "Build"
Hopefully, you'll get your XBMC app ready to go :-)
- Ecco
Hi there,
I've discovered XBMC not so long ago. And it litterally blew my mind. It's just too far ahead of the competition :)
Being a developper myself, I thought I might help at some point. So I downloaded the sources off of the SVN server, and decided that I would try building XBMC. I've quite an extensive background in OSX programming, so I was very pleased to see an Xcode project file ! But... well, I have to say, I've never seen such an ugly Xcode project :-) only script phases, used to call into Makefiles ? Ewwww :D
So, it took me two full days, but I eventually managed to write a clean Xcode project. No Makefile, very minimal and properly named script phases, no call to "./configure", etc...
At this point though, I just got my first binary of XBMC. It's still pretty dirty, (as I said, it took me two whole days. So at the end I kinda "cut around the corners" because I really wanted to get that binary), but it should be really straightforward to clean.
Anyway, I really wanted to share that with you, so please give me your feedback on this "All in Xcode" patch (http://www.likid.org/public/XBMC_ALL_IN_XCODE.patch) . Once again, I know it's really young, and it's not (yet ?) intended to be a drop-in replacement for the current build system. Please only judge the overall "new" architecture.
So, how do you use this patch ?
1/ Install Leopard (not tested on Tiger yet. I think it wouldn't work out of the box, but it should be pretty easy to get things working on Tiger)
2/ Check out SVN ToT
3/ Apply patch
4/ Install MacPorts
5/ "port install lzo bzip2 libSDL libSDL_image libSDL_mixer ffmpeg+postproc+gpl mysql5 libmad libogg libvorbis fribidi boost pcre glew" (I hope I'm not missing any) .Any mising port will cause a red item in Xcode, which is really convenient :-)
6/ Press "Build"
Hopefully, you'll get your XBMC app ready to go :-)
- Ecco
yes it is pretty fugly, thanks to the previous (now not with XBMC anymore) devs. I've been working on an off to clean it up but the push to Atlantis prevented me from doing more.
I'd be interested in your changes and will try out your patch when I get time. A quick look suggests that building some of the external libs are missing. The current scratch build sequence is quite complicated and the current XCode project only tells part of the story.
XBMCLauncher under AppleTV r2.3 is giving us fits :( so it might be a few days until I can get around to this.
Keep in mind that there is current dev work to move to cmake for all three platforms. cmake can generate an XCode project as well as a VS project for windows.
jeremyhu
2009-01-10, 10:44
1) You should just #include <stdint.h> rather than typedef int64_t.
2) Re: this block:
- smbc_urlencode(buffer, (char*)value.c_str(), buffer_len);
+//RGO smbc_urlencode(buffer, (char*)value.c_str(), buffer_len);
Check out my bug to samba about this a few days ago:
https://bugzilla.samba.org/show_bug.cgi?id=6022
You can use samba-3.0.x or grab the latest samba port from MacPorts which I patched to include this symbol.
3) Re: this block:
-#include <langinfo.h>
+#include </usr/include/langinfo.h>
Why?
4) Re:
Index: XBMC/guilib/Surface.cpp
================================================== =================
--- XBMC/guilib/Surface.cpp (revision 16310)
+++ XBMC/guilib/Surface.cpp (working copy)
@@ -922,7 +922,8 @@
glXWaitX();
}
#endif
-#ifdef __APPLE__
+// RGO #ifdef __APPLE__
+#if 0
#include "SDL_private.h"
extern SDL_VideoDevice* current_video; // ignore the compiler warning
void* newContext = NULL;
Why are you #if 0ing out the SDL code?
1) You should just #include <stdint.h> rather than typedef int64_t.
2) Re: this block:
- smbc_urlencode(buffer, (char*)value.c_str(), buffer_len);
+//RGO smbc_urlencode(buffer, (char*)value.c_str(), buffer_len);
Check out my bug to samba about this a few days ago:
https://bugzilla.samba.org/show_bug.cgi?id=6022
You can use samba-3.0.x or grab the latest samba port from MacPorts which I patched to include this symbol.
3) Re: this block:
-#include <langinfo.h>
+#include </usr/include/langinfo.h>
Why?
4) Re:
Index: XBMC/guilib/Surface.cpp
================================================== =================
--- XBMC/guilib/Surface.cpp (revision 16310)
+++ XBMC/guilib/Surface.cpp (working copy)
@@ -922,7 +922,8 @@
glXWaitX();
}
#endif
-#ifdef __APPLE__
+// RGO #ifdef __APPLE__
+#if 0
#include "SDL_private.h"
extern SDL_VideoDevice* current_video; // ignore the compiler warning
void* newContext = NULL;
Why are you #if 0ing out the SDL code?
This is a dead branch. I tired to sync with Ecco but he disappeared. Regarding 3) and 4). Ecco was trying to fix the build. 4) is very important as it is an ugly hack to fix an SDL problems with mouse bounding going from windowed to fullscreen.
Hi... I'm not a hardcore cross-platform developer but I have created some basic apps in XCode and know how to build a clean project without too much extra installations and dependencies. So I did just poke around here looking for a way to get an XCode project for XBMC, and would like to know if this "dead" branch has gone anywhere, or if it is available?
I just wanted to look for something I suspect is a bug with the PPC build of 9.04.1 (repack) from the logs. I don't intend (at least not in the foreseeable future) to contribute to teh SVN or anything, I'd just report the problem if I can find it.
Hi... I'm not a hardcore cross-platform developer but I have created some basic apps in XCode and know how to build a clean project without too much extra installations and dependencies. So I did just poke around here looking for a way to get an XCode project for XBMC, and would like to know if this "dead" branch has gone anywhere, or if it is available?
I just wanted to look for something I suspect is a bug with the PPC build of 9.04.1 (repack) from the logs. I don't intend (at least not in the foreseeable future) to contribute to teh SVN or anything, I'd just report the problem if I can find it.
If you are interested in compiling XBMC, just follow the instructions in the file README.osx (https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC/README.osx)
In Xcode, choose the target XBMC_ppc.app (check that the active architecture is set to ppc and active executable to XBMC_ppc)