Skip to content

Commit 718a8b3

Browse files
committed
fix: optimize plugin installation to avoid redundant files
Changed the CMake installation directives for dock, notification center, and notification plugin modules to use FILES_MATCHING with specific patterns instead of installing entire directories. This prevents redundant files from being installed during repeated builds, which was causing compilation issues. The modification specifies that only QML-related files (qmldir, *.qmltypes, *.qml, *.js) should be installed from the build directories, rather than copying all files. This resolves the problem where unnecessary files were being repeatedly installed, leading to compilation conflicts and build inconsistencies. Influence: 1. Verify that dock panel still loads and functions correctly 2. Test notification center display and interaction 3. Check notification plugin behavior 4. Ensure all QML components are properly installed and accessible 5. Test repeated builds to confirm no installation conflicts occur fix: 优化插件安装以避免冗余文件 修改了dock、通知中心和通知插件模块的CMake安装指令,使用FILES_MATCHING和 特定模式替代安装整个目录。这防止了在重复构建期间安装冗余文件,该问题曾导 致编译问题。 此修改指定仅应从构建目录安装QML相关文件(qmldir、*.qmltypes、*.qml、 *.js),而不是复制所有文件。这解决了因重复安装不必要文件而导致的编译冲突 和构建不一致问题。 Influence: 1. 验证dock面板仍能正确加载和运行 2. 测试通知中心的显示和交互 3. 检查通知插件行为 4. 确保所有QML组件正确安装并可访问 5. 测试重复构建以确认没有安装冲突发生
1 parent 413823d commit 718a8b3

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

panels/dock/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ target_include_directories(dock-plugin
161161
)
162162

163163
install(TARGETS dock-plugin DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/dock/")
164-
install(DIRECTORY "${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/dock/" DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/dock/")
164+
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/dock/ DESTINATION ${QML_INSTALL_DIR}/org/deepin/ds/dock/
165+
FILES_MATCHING PATTERN "qmldir" PATTERN "*.qmltypes" PATTERN "*.qml" PATTERN "*.js"
166+
)
167+
165168
dtk_add_config_meta_files(APPID org.deepin.ds.dock FILES dconfig/org.deepin.ds.dock.json) # compat
166169
dtk_add_config_meta_files(APPID org.deepin.ds.dock FILES dconfig/org.deepin.ds.dock.tray.json) # compat
167170
dtk_add_config_meta_files(APPID org.deepin.dde.shell FILES dconfig/org.deepin.ds.dock.json)

panels/dock/tray/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,9 @@ target_link_libraries(trayitem PRIVATE
5656
dde-shell-frame
5757
)
5858

59+
install(TARGETS dock-tray DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/dock/tray/")
60+
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/dock/tray/ DESTINATION ${QML_INSTALL_DIR}/org/deepin/ds/dock/tray/
61+
FILES_MATCHING PATTERN "qmldir" PATTERN "*.qmltypes" PATTERN "*.qml" PATTERN "*.js"
62+
)
5963
ds_install_package(PACKAGE org.deepin.ds.dock.tray TARGET trayitem)
6064
ds_handle_package_translation(PACKAGE org.deepin.ds.dock.tray)

panels/dock/tray/quickpanel/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ qt_add_qml_module(tray-quickpanel
2525
target_link_libraries(tray-quickpanel PRIVATE
2626
Dtk${DTK_VERSION_MAJOR}::Core
2727
)
28+
29+
install(TARGETS tray-quickpanel DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/dock/tray/quickpanel/")
30+
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/dock/tray/quickpanel/ DESTINATION ${QML_INSTALL_DIR}/org/deepin/ds/dock/tray/quickpanel/
31+
FILES_MATCHING PATTERN "qmldir" PATTERN "*.qmltypes" PATTERN "*.qml" PATTERN "*.js"
32+
)

panels/notification/center/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ target_link_libraries(notificationcenterpanel
5959
)
6060

6161
install(TARGETS notificationcenterpanelplugin DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/notificationcenter/")
62-
install(DIRECTORY "${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/notificationcenter/" DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/notificationcenter/")
62+
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/notificationcenter/ DESTINATION ${QML_INSTALL_DIR}/org/deepin/ds/notificationcenter/
63+
FILES_MATCHING PATTERN "qmldir" PATTERN "*.qmltypes" PATTERN "*.qml" PATTERN "*.js"
64+
)
6365

6466
ds_install_package(PACKAGE org.deepin.ds.notificationcenter TARGET notificationcenterpanel)
6567
ds_handle_package_translation(PACKAGE org.deepin.ds.notificationcenter)

panels/notification/plugin/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ qt_add_qml_module(notificationplugin
2424
)
2525

2626
install(TARGETS notificationplugin DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/notification/")
27-
install(DIRECTORY "${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/notification/" DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/notification/")
27+
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/notification/ DESTINATION ${QML_INSTALL_DIR}/org/deepin/ds/notification/
28+
FILES_MATCHING PATTERN "qmldir" PATTERN "*.qmltypes" PATTERN "*.qml" PATTERN "*.js"
29+
)

0 commit comments

Comments
 (0)