Harald Fernengel
KDE
 in KDE
 on Monday, March 09, 2009 @ 20:26

Solid Dragon

It’s time to present the little hack that I’ve been working on for a while now: A Mac OS X backend (source code) for Solid, KDE’s hardware introspection library. To make a good screen shot, and to show how easy it is to use Solid, here’s also a small hardware browser:

Mini Solid-based Hardware Browser

The backend is still in progress, and not all Solid hardware interfaces are implemented yet. Still, the generic interface can be used to introspect any device and read out its properties. You can even introspect the famous Dont_Steal_Mac_OS_X device :)

One of the nice things about Solid is that it can be used from non-KDE applications as well - it just requires Qt (*)

64-bit Leopard

Next to playing with Solid, the release of Qt 4.5 was a good excuse to play with 64-bit KDE on 10.5 (Leopard).

First, we need the magic CMake switch to build 64-bit Mac OS X applications: -DCMAKE_OSX_ARCHITECTURES=”x86_64″ (**)

Unfortunately, some of kdelib’s files rely on deprecated API which doesn’t exist in the 64-bit versions of OS X’s libraries. So after some fixing and some more commenting out of non-compiling stuff, I finally got my first KDE 64-bit application:

minibrowser.app/Contents/MacOS/minibrowser: Mach-O 64-bit executable x86_64

Screen shot: see above ;)

 

(*) Well, there’s also a D-Bus dependency

(**) You can produce universal binaries by separating the desired architectures with a semicolon, e.g. -DCMAKE_OSX_ARCHITECTURES=”x86_64;i386;ppc;ppc64″ to get all four currently supported architectures. Unfortunately, I have no clue how to create universal binaries for the third party libs that KDE depends on (e.g. D-Bus) - any automake expert, please leave a comment (or convince the projects to switch to a more humane build system).

7 Responses to “Crouching Leopard, Solid Dragon”

» Posted by Anon
 on Monday, March 09, 2009 @ 21:03

“One of the nice things about Solid is that it can be used from non-KDE applications as well - it just requires Qt (*)”

Any plans for Qt Software to “adopt” Solid and make it part of the Qt stack, as they did with Phonon? It just seems like an absolutely perfect fit to me (especially with things like GPS, bluetooth etc becoming more prevalent in various platforms), and I’ve been semi-expecting it since Trolltech’s Phonon and Solid API Review sprint.

» Posted by Alejandro Wainzinger
 on Monday, March 09, 2009 @ 21:10

This is exciting stuff! It means for Amarok that Ipod/MTP support is soon a possibility for OS X, keep up the good work!

» Posted by Patrick Spendrin
 on Monday, March 09, 2009 @ 21:35

I have heard that kde-windows project uses a cmake build system for dbus…. ;-)
And there will is a cmakeports project currently underway which will provide some patches for that.

» Posted by Leo S
 on Tuesday, March 10, 2009 @ 04:40

Cool.. Maybe solid will be the next KDE technology to be integrated into Qt? Would be very nice! Kdelibs provide some nice stuff, but it’s not nearly as nicely set up for devs (at least on windows) as qt is.

» Posted by stephenju
 on Thursday, March 12, 2009 @ 12:23

How do you do this with QtCreator? Actually, how do you do anything with QtCreator? I can’t build a 32-bit universal binary app and can’t find any documentation on how to achieve that with QtCreator. All I can find is some command-line examples. Same thing on how to build a static app or bundled framework app.

I must be very bad on finding information around here since I can’t even figure out how to deploy an app created in QtCreator. Does it create a installer that install Qt runtime? Or do my users need to install Qt SDK manually first?

Question, question, and question… :)

QtCreatorlooks so promising but so far it’s like a hobbyist toy. More guide and documentation specific to it will greatly help.

» Posted by Leo S
 on Thursday, March 12, 2009 @ 18:07

stephenju, you might consider reading the documentation that you claim doesn’t exist.

http://doc.trolltech.com/4.4/deployment-windows.html

Which is helpfully bundled with QtCreator and accessible in, you guessed it, the help tab.

» Posted by stephenju
 on Friday, March 13, 2009 @ 18:57

Yes, I am aware of the doc. But as I mentioned, it DOES NOT apply to Creator. Specifically, there’s no mention anywhere how to achieve that with the SDK download. And there’s not mention on how to use Creator with the source code download. Not to mention the doc you link is for Windows and this post and my question about Universal Binaries is for Mac.

http://doc.trolltech.com/4.5/deployment-mac.html

The macdeploy tool mentioned is actually named macdeployqt and it’s not even included in SDK download. You have to download the source and build the whole thing then figure out how to use it with Creator. :(

I like the promise of the new tools. I want it to be better. Actually I filed 3 bugs in the first 2 days I used this. But a little help from QtSoftware will be much easier for everybody.

BTW. OT but what is with the security code and then long wait for the moderation? This doesn’t smell open to me at all.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.