[Marble-devel] Improve OSX build process: build a marble framework
geilmann at cs.uni-kl.de
Fri Jun 15 10:41:26 UTC 2012
first of all: congratulations to everybody who works and worked on
marble. It's a very nice piece of software.
I wanted to use the marblewidget in a project of my own and
encountered a few problems during build. I'm working on OSX (10.6.8)
and building QTONLY (Qt 4.7) Versions of Marble. So everything may
be valid on other configurations also, but I didn't check.
The problem triggering all my activity was, the one described
in Bug 299029:
Building the app.bundle works fine, but all plugins are build in
the wrong format (.so instead of .dylib), so they cannot be loaded.
When I tried to fix this bug, I came accross a number of other problems all
related to the build process, or more precise to the targets created by the
build. As far as I figured out, all of them could be solved quite
easily if the marble library is not just build as a shared library but
bundled as a framework.
So I have two proposals to make and I need your opinion about it.
Proposal: Build universal 32/64bit binaries by default
Reason: - Qt is build that way and this would prevent
problems when loading plugins on 64bit machines
- This is mainly a prerequisit for the second
proposal, otherwise the plugins may fail there.
Status: - I have done it (patch attached).
It compiles fine and I did not encounter any problems
with it during tests.
Proposal: Build the library Marble as a Framework-Bundle.
The Framework should contain the library, the plugins, headers and the data files.
Reason: - Frameworks are the usual way to distribute shared
libraries on OSX. Providing a framework would allow
developers to include the library very easily in
their own programs.
- A Framework can be installed at the usual
paths (/Library/Frameworks), (~/Library/Frameworks)
and is available for all programs then, especially
the qt designer plugins could be linked to them with ease
- The users know about frameworks (at least advanced users)
and they can easily update and/or remove them.
- Frameworks can be included into Application Bundles,
and shipped with the App. The procedure to do
this is the same for all frameworks and every Mac Programmer
should already know it.
Work to do: - Change Build Files to build the Framework
- Change creation of App-Bundle: link against the Framework
instead against the libraries
- Fix the magick in MarbleDirs, in order to find the plugins
and the data file inside the framework bundle.
- Change the Scripts that create the binary releases, in order
to include not only the Qt Frameworks but also the Marble Framework
Status: - I partly implemented this using dirty hacks (patching
automatically generated files by hand, calling manually
calling shell scripts at the right point during
the build process,...). I managed to get a
Framework put together and I was able to use it to get the designer
plugins working, as well as linking my own application against it.
- I didn't investigate any other plugins, nor did I try to get the
data and plugin path right
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1150 bytes
Desc: not available
More information about the Marble-devel