COMPONENT Devel
)
-ecm_generate_dbus_service_file(
- NAME org.freedesktop.FileManager1
- EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
- SYSTEMD_SERVICE plasma-dolphin.service
- DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
- RENAME org.kde.dolphin.FileManager1.service
-)
+if(FLATPAK)
+ ecm_generate_dbus_service_file(
+ NAME org.freedesktop.FileManager1
+ EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
+ SYSTEMD_SERVICE plasma-dolphin.service
+ DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
+ )
+else()
+ ecm_generate_dbus_service_file(
+ NAME org.freedesktop.FileManager1
+ EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
+ SYSTEMD_SERVICE plasma-dolphin.service
+ DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
+ RENAME org.kde.dolphin.FileManager1.service
+ )
+endif()
ecm_install_configured_files(INPUT plasma-dolphin.service.in DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
main.cpp
)
+if(FLATPAK)
+ target_compile_definitions(dolphin PRIVATE FLATPAK)
+endif()
+
# Sets the icon on Windows and OSX
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*system-file-manager.png")
ecm_add_app_icon(dolphin_APPICON_SRCS ICONS ${ICONS_SRCS})
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
+#ifdef FLATPAK
+ KDBusService dolphinDBusService(KDBusService::NoExitOnFailure);
+#else
KDBusService dolphinDBusService;
+#endif
DBusInterface interface;
interface.setAsDaemon();
return app.exec();