Skip to content

Commit 6bd8c23

Browse files
committed
revert: "build: change plugin install from system-wide to widget directory"
It wasn't a good approach because updates to the widget remove the plugin and it needs to be installed again. Support for immutable distributions using QML_IMPORT_PATH will be added in later patch refs: a588828
1 parent 22a3cb6 commit 6bd8c23

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

install-plugin.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ if [ -d "build" ]; then
44
rm -rf build
55
fi
66

7-
cmake -B build/plugin -S . -DBUILD_PLUGIN=ON -DCMAKE_INSTALL_PREFIX=~/.local
8-
cmake --build build/plugin && cmake --install build/plugin
7+
# Install plugin system-wide (required for qml modules)
8+
cmake -B build/plugin -S . -DBUILD_PLUGIN=ON -DCMAKE_INSTALL_PREFIX=/usr
9+
cmake --build build/plugin && sudo cmake --install build/plugin

install.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ if [ -d "build" ]; then
55
fi
66

77
# Install widget for current user
8-
cmake -B build/ -S . -DINSTALL_PLASMOID=ON -DBUILD_PLUGIN=ON -DCMAKE_INSTALL_PREFIX=~/.local
9-
cmake --build build/
10-
cmake --install build/
8+
cmake -B build/plasmoid -S . -DINSTALL_PLASMOID=ON -DCMAKE_INSTALL_PREFIX=~/.local
9+
cmake --build build/plasmoid
10+
cmake --install build/plasmoid
1111
# CMakeLists.txt plasma_install_package does't copy executable permission
1212
chmod 700 "$HOME/.local/share/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/list_presets.sh"
1313
chmod 700 "$HOME/.local/share/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/gdbus_get_signal.sh"
14+
15+
# Install plugin system-wide (required for qml modules)
16+
cmake -B build/plugin -S . -DBUILD_PLUGIN=ON -DCMAKE_INSTALL_PREFIX=/usr
17+
cmake --build build/plugin
18+
sudo cmake --install build/plugin

plugin/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
set(PLUGIN_NAME "panelcolorizerplugin")
22
set(LIB_NAME "panelcolorizer")
3-
set(PLUGIN_ID "luisbocanegra.panel.colorizer")
43

54
add_library(${PLUGIN_NAME} SHARED ${PLUGIN_NAME}.cpp ${LIB_NAME}.cpp)
65

@@ -9,5 +8,5 @@ target_link_libraries(${PLUGIN_NAME}
98
Qt6::Qml
109
)
1110

12-
install(TARGETS ${PLUGIN_NAME} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/plasmoids/${PLUGIN_ID}/contents/ui)
13-
install(FILES qmldir DESTINATION ${PLASMA_DATA_INSTALL_DIR}/plasmoids/${PLUGIN_ID}/contents/ui)
11+
install(TARGETS ${PLUGIN_NAME} DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/${LIB_NAME})
12+
install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/${LIB_NAME})

0 commit comments

Comments
 (0)