[Marble-devel] MarbleWidgetPlugin on OSX

Torsten Rahn tackat at t-online.de
Thu Sep 10 10:34:08 CEST 2009


Hi Martijn,

Thanks a lot for your feedback. I'm sure that this will be helpful for other
people. I'd suggest however that you add information like this to our 
techbase wiki:

http://techbase.kde.org/Projects/Marble

There people will be able to find the information easily.

Best Regards,

Torsten



Am Mittwoch 09 September 2009 17:02:10 schrieb Martijn Kuipers:
> Dear list,
> 
> MarbleWidget is great. So nice I wanted to try it on my MacBook (OS-X
> 10.5), which I got a week ago.
> This is my first try with Qt, other than "Hello World!". I ran into
> some troubles. Not really any info via google, so I thought I would
> write my steps down while figuring it out. Here it goes:
> 
> After a lot of struggling I managed to get the MarbleWidgetPlugin to
> show up in (Qt)Designer.
> Unfortunately QtCreator still does not show them (it has "invisible"
> fields for them).
> 
> 
> Newby: New to MarbleWidget, new to Qt, new to OS-X
> ---------------------------------------------------------------------------
> --- Follow the instructions on
>  http://techbase.kde.org/Projects/Marble/MarbleDesigner .
> I worked with the source-tar as neither SVN heads worked for me.
> 
> Make sure you switch the DESIGNER plugin option on:
> cmake -DQTONLY=ON -DWITH_DESIGNER_PLUGIN=ON ../marble
> 
> If you run make, you probably get some errors like
> MarbleWidgetPlugin.h:26: Error: Undefined interface
> 
> 
> The header file actually has this comment related to MacOSX, so just
> follow that
> // Workaround: moc on osx is unable to find this file, when prefix
> with QtDesigner/
> // moc also doesn't respect Q_OS_* macros, otherwise I could ifdef this.
> #include <QtDesigner/QDesignerCustomWidgetInterface>
> 
> Just delete the QtDesigner/ part to remain
> #include <QDesignerCustomWidgetInterface>
> 
> You must do this in the following 3 files:
> ../marble/src/plugins/designer/marblewidget/MarbleWidgetPlugin.h
> ../marble/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h
> ../marble/src/plugins/designer/navigator/MarbleNavigatorPlugin.h
> 
> Now it compiles but creates bundles (?) and I needed dynamic libraries
> (not sure what the differences are)
> So we need to recompile the 3 widgets by hand, luckily the command
> line argument to compile them are given in the linkt.txt file. Let's
> start with MarbleWidgetPlugin:
> Go to
> marble_build/src/plugins/designer/marblewidget
> 
> The link.txt fille is in CMakeFiles/MarbleWidgetPlugin.dir
> The file contains
> /usr/bin/c++   -bundle -headerpad_max_install_names  -o
> libMarbleWidgetPlugin.so CMakeFiles/MarbleWidgetPlugin.dir/MarbleWidgetP
> lugin.o CMakeFiles/MarbleWidgetPlugin.dir/qrc_marble.o -framework
> QtCore -framework QtDBus -framework QtGui -framework QtXml -fr
> amework QtSvg -framework QtNetwork ../../../lib/libmarblewidget.
> 0.8.0.dylib -framework QtCore -framework QtDBus -framework QtGui
>   -framework QtXml -framework QtSvg -framework QtNetwork -framework
> QtScript -framework QtWebKit -framework ApplicationServices
> 
> We need to replace -bundle with -dynamiclib and
> libMarbleWidgetPlugin.so with libMarbleWidgetPlugin.dylib and copy the
> resulting dylib file to the right location
> cp libMarbleWidgetPlugin.dylib /Developer/Applications/Qt/plugins/
> designer/.
> 
> Follow the same procedure for the navigator and latloneditwidget plugins
> 
> 
> I hope this helps someone. Please if there is a simples way of doing
> this, please let me know!
> 
> Kind regards,
> Martijn
> 


More information about the Marble-devel mailing list