mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-07 10:51:45 +00:00
Add Flatpak patches to Dolphin depending on CMake definition
When Dolphin gets packaged as a flatpak, this patch gets applied: https://invent.kde.org/packaging/flatpak-kde-applications/-/blob/master/dolphinpatch.patch That's not really an ideal solution, so this is probably a better idea -- to upstream the patches and apply them depending on a CMake definition
This commit is contained in:
parent
dafa1e1f20
commit
3abc4cfcd4
|
@ -175,6 +175,14 @@ install(FILES
|
||||||
COMPONENT Devel
|
COMPONENT Devel
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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(
|
ecm_generate_dbus_service_file(
|
||||||
NAME org.freedesktop.FileManager1
|
NAME org.freedesktop.FileManager1
|
||||||
EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
|
EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
|
||||||
|
@ -182,6 +190,7 @@ ecm_generate_dbus_service_file(
|
||||||
DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
|
DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
|
||||||
RENAME org.kde.dolphin.FileManager1.service
|
RENAME org.kde.dolphin.FileManager1.service
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
ecm_install_configured_files(INPUT plasma-dolphin.service.in DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
|
ecm_install_configured_files(INPUT plasma-dolphin.service.in DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
|
||||||
|
|
||||||
|
|
|
@ -340,6 +340,10 @@ target_sources(dolphin PRIVATE
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(FLATPAK)
|
||||||
|
target_compile_definitions(dolphin PRIVATE FLATPAK)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Sets the icon on Windows and OSX
|
# Sets the icon on Windows and OSX
|
||||||
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*system-file-manager.png")
|
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*system-file-manager.png")
|
||||||
ecm_add_app_icon(dolphin_APPICON_SRCS ICONS ${ICONS_SRCS})
|
ecm_add_app_icon(dolphin_APPICON_SRCS ICONS ${ICONS_SRCS})
|
||||||
|
|
|
@ -154,7 +154,11 @@ int main(int argc, char **argv)
|
||||||
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
||||||
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
||||||
|
|
||||||
|
#ifdef FLATPAK
|
||||||
|
KDBusService dolphinDBusService(KDBusService::NoExitOnFailure);
|
||||||
|
#else
|
||||||
KDBusService dolphinDBusService;
|
KDBusService dolphinDBusService;
|
||||||
|
#endif
|
||||||
DBusInterface interface;
|
DBusInterface interface;
|
||||||
interface.setAsDaemon();
|
interface.setAsDaemon();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user