DBus autolaunch on Mac OS X

I've submitted some patches to D-Bus to allow it to auto-launch on Mac OS X. This should let me remove some completely awful and distribution-specific code from kdelibs.

It's got a few quirks to work out, but on 10.5, it's rockin'! Even scarier, I wrote C code. I think it might even be halfway decent C code. Time to look out, Armageddon is clearly happening any day now. 🙂

Oh, and as an aside, this is the first time I've actually had to break down and finally learn how to use Git, since that's what dbus uses, and it's friggin' amazing. Lightning fast, and well-suited to sending patches upstream.

Share on Facebook

11 comments to DBus autolaunch on Mac OS X

  • Ah, C code! Keep it up 🙂

  • And Git is brilliant for tracking changes spontaneously in directories you don’t usually have under version control. All you need is:
    git init
    git add .
    git commit -a -m “import”
    And you can track all your changes 🙂 And once you don’t need it anymore:
    rm -rf .git
    I love it!

  • Could it be that the howto documentation is missing some infos ?
    I try to build e.g. qt-copy as you explained at http://techbase.kde.org/index.php?title=Projects/KDE_on_Mac_OS_X/Tips_On_Building, but I always get errors while building.
    I am using your latest snapshot + Xcode 3 on a Intel Macbook with Leopard.
    Could it be that you have different configure commandline options ?
    Cheers,
    Daniel

  • Ranger Rick

    Hm, it shouldn’t be different, I use that configure-qt.sh script specifically so I use the same options every time…
    What errors do you get?

  • cd src/gui/ && make -f Makefile
    make -f Makefile.Debug all
    c++ -c -B/tmp/ldfakeroot -I/usr/include -I/opt/kde4-deps/include -fconstant-cfstrings -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_44_API_QSQLQUERY_FINISH -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_RASTER_IMAGEENGINE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_FREETYPE -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQ_INTERNAL_QAPP_SRC -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/Users/daniel/source/kde-mac/source.build/qt-copy/mkspecs/macx-g++ -I/Users/daniel/source/kde-mac/source.build/qt-copy/src/gui -I../../include/QtCore -I../../include/QtCore -I../../include -I../../include -I../../include/QtGui -I/Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/dialogs -I.moc/debug-shared -I.uic/debug-shared -I. -F/Users/daniel/source/kde-mac/compile.build/qt-copy/lib -o .obj/debug-shared/qapplication_mac.o /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp: In function ‘void qt_mac_display_change_callbk(_CGDirectDisplayID*, CGDisplayChangeSummaryFlags, void*)’:
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp:235: error: ‘kCGDisplayDesktopShapeChangedFlag’ was not declared in this scope
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp: In function ‘void qt_init(QApplicationPrivate*, int)’:
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp:1084: error: ‘SRefCon’ was not declared in this scope
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp: In function ‘void qt_mac_display_change_callbk(_CGDirectDisplayID*, CGDisplayChangeSummaryFlags, void*)’:
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp:235: error: ‘kCGDisplayDesktopShapeChangedFlag’ was not declared in this scope
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp: In function ‘void qt_init(QApplicationPrivate*, int)’:
    /Users/daniel/source/kde-mac/source.build/qt-copy/src/gui/kernel/qapplication_mac.cpp:1084: error: ‘SRefCon’ was not declared in this scope
    lipo: can’t figure out the architecture type of: /var/folders/2X/2XDrRiTYGDmxhjaIZRkg2U+++TI/-Tmp-//ccN1vmpp.out
    make[2]: *** [.obj/debug-shared/qapplication_mac.o] Error 1
    make[1]: *** [debug-all] Error 2
    make: *** [sub-gui-make_default-ordered] Error 2

  • Ranger Rick

    Weird, I’ve never seen this before.
    Maybe you’re missing the SDK root or something? Do you have /Developer/SDKs/MacOSX10.4u.sdk ?

  • yes I have.
    I have /Developer/SDKs/MacOSX10.4u.sdk/, /Developer/SDKs/MacOSX10.5u.sdk/ and even /Developer/SDKs/MacOSX10.3.9.sdk/
    Maybe I should reinstall XCode 3.0 ?
    Cheers,
    Daniel

  • Ranger Rick

    I’m out of ideas, I can’t replicate your error. Maybe try opening a bug or checking in on the kde-devel list or irc channel to see if anyone has any ideas…

  • Hi,
    I just found similar issues, which were caused by the older apple gcc 3.3.
    I am not sure if its a similar issue now.
    I have:
    # which gcc && gcc –version
    /usr/bin/gcc
    i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
    Copyright (C) 2005 Free Software Foundation, Inc.
    Cheers,
    Daniel

  • It worked!
    Just to recap everything:
    I reinstalled XCode 3.0 – No Change
    I reinstalled CMake from CVS – No Change
    After that I just tried to change the SDK Set from 10.4u to 10.5 and it worked as it should.
    I thought the XCode 3.0 includes all needed includes/libs with 10.4u, but I can’t build it with this on my leopard system. Switching to SDK 10.5 does the job.
    $ diff -u qt/resources/configure-qt.sh.orig qt/resources/configure-qt.sh
    — qt/resources/configure-qt.sh.orig 2008-01-30 14:01:52.000000000 +0100
    +++ qt/resources/configure-qt.sh 2008-01-30 12:09:12.000000000 +0100
    @@ -36,5 +36,5 @@
    -framework \
    -universal \
    -confirm-license \
    – -sdk /Developer/SDKs/MacOSX10.4u.sdk \
    + -sdk /Developer/SDKs/MacOSX10.5.sdk \
    Thats the only difference and now I can build qt-copy.
    Hope this helps other people who step into the issue.
    cheers,
    Daniel

  • Just another small thing:
    decibel is under trunk too. I had to change the PACKAGES list in make-packages.sh (As you can see in the following diff)
    Cheers,
    Daniel
    $ diff -u make-packages.sh.orig make-packages.sh
    — make-packages.sh.orig 2008-01-30 14:59:55.000000000 +0100
    +++ make-packages.sh 2008-01-30 14:37:39.000000000 +0100
    @@ -10,12 +10,12 @@
    #PACKAGES=”strigi:trunk/kdesupport/strigi soprano:branches/soprano/2.0 kdelibs:branches/KDE/4.0/kdelibs blitz:trunk/kdesupport/qimageblitz kdepimlibs:branches/KDE/4.0/kdepimlibs decibel:branches/work/decibel kdebase:branches/KDE/4.0/kdebase kdeadmin:branches/KDE/4.0/kdeadmin kdeartwork:branches/KDE/4.0/kdeartwork kdeedu:branches/KDE/4.0/kdeedu kdegames:branches/KDE/4.0/kdegames kdegraphics:branches/KDE/4.0/kdegraphics kdemultimedia:branches/KDE/4.0/kdemultimedia kdenetwork:branches/KDE/4.0/kdenetwork kdesdk:branches/KDE/4.0/kdesdk kdetoys:branches/KDE/4.0/kdetoys kdeutils:branches/KDE/4.0/kdeutils koffice:trunk/koffice kdevplatform:trunk/KDE/kdevplatform kdewebdev:branches/KDE/4.0/kdewebdev amarok:trunk/extragear/multimedia”
    # KDE 4.1
    -PACKAGES=”strigi:trunk/kdesupport/strigi soprano:branches/soprano/2.0 kdelibs:trunk/KDE/kdelibs blitz:trunk/kdesupport/qimageblitz kdepimlibs:trunk/KDE/kdepimlibs decibel:playground/pim/decibel kdebase:trunk/KDE/kdebase kdeadmin:trunk/KDE/kdeadmin kdeartwork:trunk/KDE/kdeartwork kdeedu:trunk/KDE/kdeedu kdegames:trunk/KDE/kdegames kdegraphics:trunk/KDE/kdegraphics kdemultimedia:trunk/KDE/kdemultimedia kdenetwork:trunk/KDE/kdenetwork kdepim:trunk/KDE/kdepim kdesdk:trunk/KDE/kdesdk kdetoys:trunk/KDE/kdetoys kdeutils:trunk/KDE/kdeutils koffice:trunk/koffice kdevplatform:trunk/KDE/kdevplatform kdevelop:trunk/KDE/kdevelop kdewebdev:trunk/KDE/kdewebdev kdebindings:trunk/KDE/kdebindings amarok:trunk/extragear/multimedia ktorrent:trunk/extragear/network/ktorrent”
    +PACKAGES=”strigi:trunk/kdesupport/strigi soprano:branches/soprano/2.0 kdelibs:trunk/KDE/kdelibs blitz:trunk/kdesupport/qimageblitz kdepimlibs:trunk/KDE/kdepimlibs decibel:trunk/playground/pim/decibel kdebase:trunk/KDE/kdebase kdeadmin:trunk/KDE/kdeadmin kdeartwork:trunk/KDE/kdeartwork kdeedu:trunk/KDE/kdeedu kdegames:trunk/KDE/kdegames kdegraphics:trunk/KDE/kdegraphics kdemultimedia:trunk/KDE/kdemultimedia kdenetwork:trunk/KDE/kdenetwork kdepim:trunk/KDE/kdepim kdesdk:trunk/KDE/kdesdk kdetoys:trunk/KDE/kdetoys kdeutils:trunk/KDE/kdeutils koffice:trunk/koffice kdevplatform:trunk/KDE/kdevplatform kdevelop:trunk/KDE/kdevelop kdewebdev:trunk/KDE/kdewebdev kdebindings:trunk/KDE/kdebindings amarok:trunk/extragear/multimedia ktorrent:trunk/extragear/network/ktorrent”
    DO_PACKAGES=”$PACKAGES”
    -SVNROOT=https://svn.kde.org/home/kde
    +#SVNROOT=https://svn.kde.org/home/kde
    # for anonymous users:
    -#SVNROOT=svn://anonsvn.kde.org/home/kde
    +SVNROOT=svn://anonsvn.kde.org/home/kde
    CMAKE_ARGS=”-DBUILD_k3b:BOOL=OFF -DBUILD_kaudiocreator=OFF -DBUILD_kmid=OFF -DBUILD_kplayer=OFF -DBUILD_kmplayer=OFF -DKDE4_DISABLE_MULTIMEDIA=ON”