kdeinit5 on OS X

René J.V. Bertin rjvbertin at gmail.com
Mon Nov 23 12:29:23 UTC 2015


Hi,

Preparing a MacPorts port for kf5-kinit, I see the following in kdeinit's CMake file:

add_executable(kdeinit5 ${kdeinit_SRCS})
if (APPLE)                       
  # this has to be GUI on OSX because it launches GUI apps and need a quartz context
  set_target_properties(kdeinit5 PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
  set_target_properties(kdeinit5 PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.kdeinit5")
  set_target_properties(kdeinit5 PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Init")
else ()           
  ecm_mark_nongui_executable(kdeinit5)
endif ()          


Has that been verified? AFAIK, the only thing mark_nongui_exec does on OS X is to build the application as a regular executable, instead of as an app bundle. And also AFAIK, this makes no difference on what the resulting application can do.

Hence my question: has anyone verified whether the app bundle nature is required? Kdeinit4 was built like that, and as a result wasn't found by the library function (KToolInvocation::startKdeinit()) that is supposed to start things like klauncher through kdeinit4. I see the KF5 version uses QSP::findExecutable(), and its documentation is mute about whether that function is able to find a BundleExec on OS X.

If not: what possibilities do I have to verify this myself when I am only just at the point where I could build and install kf5-kinit itself? (I see a lot of leftover Q_OS_MAC tokens, suggesting the code hasn't been verified beyond whether it builds.)

NB: if kdeinit5 indeed has to be built as an app bundle its executable isn't found because of that a wrapper script might be required, like the one I wrote for KDE4:

#!/bin/sh

if [ "${TERM}" != "" ] ;then
     # launched from a terminal session; do not use LaunchServices:
     exec @KDEAPPDIR@/kdeinit5.app/Contents/MacOS/kdeinit5 "$@"
else
     exec open -W -a @KDEAPPDIR@/kdeinit5.app --args "$@"
fi


R



More information about the Kde-frameworks-devel mailing list