[KDE/Mac] kdeinit5 on OS X

René J. V. Bertin rjvbertin at gmail.com
Mon Nov 23 19:42:33 UTC 2015


(Cross-posting from kde-frameworks-devel; should have done so straight away!)

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

add_executable(kdeinit5 ${kdeinit_SRCS})
if (APPLE)                       
  # this has to be GUI on OSX because it launches GUI apps and need a quartz 
  set_target_properties(kdeinit5 PROPERTIES MACOSX_BUNDLE_INFO_PLIST 
  set_target_properties(kdeinit5 PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER 
  set_target_properties(kdeinit5 PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE 
else ()           
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 

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:


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


More information about the kde-mac mailing list