xbmc/xbmc — pull request #1049 by theuni (2012-06-06 00:36:40+00:00)
Title: Build Shared Lib

This is a continuation of https://github.com/xbmc/xbmc/pull/890

This PR is purely foundational. No new behavior is introduced here, except for the ability to build a libxbmc.so in linux/osx, but the lib isn't good for much in its current form.

I'm submitting this now because I have several things up that depend on it. Because it's a nightmare to rebase, it would be a big help to get this part in, and continue contributing to it after that.

There are 2 primary things going on here:

1. Building as a shared lib. Gives us the ability to do unit testing with all of xbmc's features at our disposal. Also allows for stand-alone programs to use our functionality, eg. scrapers. Eventually we may want to come up with an API that allows for individual services to be started up.

2. Refactor startup to allow us to run without a window. When combined with #1, this could lead to headless, lightweight xbmc instances. There is still lots of work that remains here. Many functions still rely on a window to exist, so it's quite crash-heavy. As a result, I didn't hook up any way to run this way.

@davilla This likely needs some osx love. For OSX I made an attempt at the link-line, but I'm unfamiliar with the syntax there.

@wiso For win32 I didn't attempt any of the shared lib stuff, only fixed up the startup sequence to match current behavior. I have no way to test, but I think it should be ok.