Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3a06743
Converted CMakelist and strings for KF6
Jul 26, 2024
2872d3d
Added ignore build
Jul 26, 2024
29cfea0
Removed build directory from commit.
Jul 26, 2024
b50e0ab
Modified .gitignore to exclude some more items.
Jul 26, 2024
26a3a16
Update CMakeLists.txt to build and install correctly on Fedora 42
felagund Oct 7, 2025
5efb235
Make synced icon appear
felagund Oct 7, 2025
f37513f
Update README.md
felagund Oct 7, 2025
ed31f9e
Update README.md – Fix links to docs
felagund Oct 7, 2025
8e94d05
Make menu action work on Plasma 6 (and remove obsolete things)
felagund Oct 7, 2025
1ed1b8f
Rename files so they adhere to KDE naming conventions
felagund Oct 7, 2025
588047f
Rename also inside files now that they were renamed
felagund Oct 7, 2025
619f73a
Add and update license information
felagund Oct 7, 2025
b054f40
Fix menu item being shown for files that are being uploaded
felagund Oct 7, 2025
e1d3b85
Add icons and fix readme
felagund Oct 7, 2025
134fb37
Update README.md - specify KDE version
felagund Oct 8, 2025
a87efc1
Add icon to json file for fileitemaction
felagund Oct 8, 2025
d3d995f
Remove old files during install
felagund Oct 8, 2025
6e972d0
Remove one uninstall line that caused failed install
felagund Oct 13, 2025
5fe0a24
Update README.md - update Build instructions to use one command less
felagund Oct 13, 2025
54c70f2
Fix Dolphin crash when Insync was not running or when it was starting
felagund Oct 16, 2025
b93f935
Readme: Add dependencies for Fedora installation
felagund Jan 4, 2026
131517f
Update README with dependencies for Kubuntu
felagund Jan 26, 2026
de53666
Modify build instructions and installation notes
felagund Feb 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#Build
CMakeLists.txt.user
/build*
.clang-format
*~

# Compiled Object files
*.slo
*.lo
Expand Down
96 changes: 69 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,106 @@
project(insyncdolphinplugins)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16)

include(FeatureSummary)
project(insyncdolphinplugins LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

set(QT_MIN_VERSION "5.5.1")
set(KF5_MIN_VERSION "5.16.0")
include(FeatureSummary)
include(CMakePackageConfigHelpers)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Network)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
# Find required packages
find_package(Qt6 CONFIG REQUIRED COMPONENTS Core Network Widgets)
find_package(ECM REQUIRED NO_MODULE)
find_package(KF6Config REQUIRED)
find_package(KF6CoreAddons REQUIRED)
find_package(KF6KIO REQUIRED)
find_package(KF6WidgetsAddons REQUIRED)

# Set up CMake module path
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include_directories(${CMAKE_CURRENT_BINARY_DIR})

find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS KIO)

# Include KDE-specific CMake modules
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMMarkNonGuiExecutable)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(GenerateExportHeader)


# Set package properties
set_package_properties(insyncdolphinplugins PROPERTIES
DESCRIPTION "The Insync Dolphin plugin that adds Insync's context menus and overlay icons"
URL "https://www.insynchq.com"
TYPE REQUIRED
PURPOSE "Provides Insync's implementation of the file item action plugin interface."
)

# Add definitions and set RPATH
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_FOREACH -DQT_NO_KEYWORDS)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
set(CMAKE_INSTALL_RPATH "")

# Dolphin plugin helper
add_definitions(-DTRANSLATION_DOMAIN=\"insyncdolphinpluginhelper\")
set(INSYNC_DOLPHIN_PLUGIN_HELPER insyncdolphinpluginhelper)
add_library(${INSYNC_DOLPHIN_PLUGIN_HELPER} SHARED insyncdolphinpluginhelper.cpp)
target_link_libraries(${INSYNC_DOLPHIN_PLUGIN_HELPER} Qt5::Network)
add_library(${INSYNC_DOLPHIN_PLUGIN_HELPER} SHARED insyncdolphinpluginhelper.cpp
insyncdolphinpluginhelper.hpp)
target_link_libraries(${INSYNC_DOLPHIN_PLUGIN_HELPER} PRIVATE Qt6::Network)
generate_export_header(${INSYNC_DOLPHIN_PLUGIN_HELPER} BASE_NAME insyncdolphinpluginhelper)
install(TARGETS ${INSYNC_DOLPHIN_PLUGIN_HELPER} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

# Item action plugin
set(INSYNC_ACTION_PLUGIN fileitemactioninsyncplugin)
add_library(${INSYNC_ACTION_PLUGIN} MODULE ${INSYNC_ACTION_PLUGIN}.cpp)
target_link_libraries(${INSYNC_ACTION_PLUGIN}
KF5::CoreAddons
KF5::KIOCore
KF5::KIOWidgets
add_definitions(-DTRANSLATION_DOMAIN=\"insyncfileitemaction\")
set(INSYNC_ACTION_PLUGIN insyncfileitemaction)
add_library(${INSYNC_ACTION_PLUGIN} MODULE ${INSYNC_ACTION_PLUGIN}.cpp
insyncfileitemaction.hpp)
target_link_libraries(${INSYNC_ACTION_PLUGIN} PRIVATE
KF6::CoreAddons
KF6::KIOCore
KF6::KIOFileWidgets
KF6::KIOWidgets
${INSYNC_DOLPHIN_PLUGIN_HELPER}
)
install(FILES ${INSYNC_ACTION_PLUGIN}.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(TARGETS ${INSYNC_ACTION_PLUGIN} DESTINATION ${PLUGIN_INSTALL_DIR})
install(TARGETS ${INSYNC_ACTION_PLUGIN} DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/kfileitemaction)

# Overlay icon plugin
set(INSYNC_OVERLAY_PLUGIN overlayiconinsyncplugin)
add_library(${INSYNC_OVERLAY_PLUGIN} MODULE ${INSYNC_OVERLAY_PLUGIN}.cpp)
target_link_libraries(${INSYNC_OVERLAY_PLUGIN}
KF5::CoreAddons
KF5::KIOCore
KF5::KIOWidgets
add_definitions(-DTRANSLATION_DOMAIN=\"insyncoverlayicon\")
set(INSYNC_OVERLAY_PLUGIN insyncoverlayicon)
add_library(${INSYNC_OVERLAY_PLUGIN} MODULE ${INSYNC_OVERLAY_PLUGIN}.cpp
insyncoverlayicon.hpp
insyncoverlayicon.json)
target_link_libraries(${INSYNC_OVERLAY_PLUGIN} PRIVATE
KF6::CoreAddons
KF6::KIOCore
KF6::KIOFileWidgets
KF6::KIOWidgets
${INSYNC_DOLPHIN_PLUGIN_HELPER}
)
install(TARGETS ${INSYNC_OVERLAY_PLUGIN} DESTINATION ${PLUGIN_INSTALL_DIR}/kf5/overlayicon)
install(TARGETS ${INSYNC_OVERLAY_PLUGIN} DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/overlayicon)

# Icons
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/usr/share/icons/
DESTINATION ${KDE_INSTALL_ICONDIR}
FILES_MATCHING
PATTERN "*.png"
PATTERN "*.svg"
)

# Remove files from previous installations
# They were renamed and if they are still present, the overlay icons appear twice
# Luckily when the files are not there, this fails silently
install(CODE "
file(REMOVE
\"\${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_PLUGINDIR}/kf6/overlayicon/overlayiconinsyncplugin.so\"
\"\${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_PLUGINDIR}/kf6/kfileitemaction/fileitemactioninsyncplugin.so\"
\"\${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_DATADIR}/kio/servicemenus/fileitemactioninsyncplugin.desktop\"
)
")

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
Loading