Skip to content

Conversation

@18202781743
Copy link
Contributor

  1. Replaced automatic DTK version detection with explicit DTK5 option
    for unified build configuration
  2. Introduced DTK_NAME_SUFFIX variable to differentiate between DTK5
    (empty) and DTK6 ("6") builds
  3. Updated all CMake configuration files to use DTK_VERSION_MAJOR and
    DTK_NAME_SUFFIX consistently
  4. Modified Debian packaging to support both DTK5 and DTK6 with separate
    build profiles
  5. Added DTK6-specific Debian package definitions and installation
    scripts
  6. Updated debian/rules to handle separate builds for DTK5 and DTK6 with
    proper version mapping
  7. Fixed include paths, library names, and configuration file names to
    follow DTK naming conventions
  8. Ensured proper Qt version selection (Qt5 for DTK5, Qt6 for DTK6)
    throughout the build system

Log: Unified build system now supports both DTK5 and DTK6 with explicit
configuration options

Influence:

  1. Test building with DTK5=ON to ensure DTK5 compatibility
  2. Test building with DTK5=OFF to ensure DTK6 compatibility
  3. Verify library naming: dtkdeclarative for DTK5, dtk6declarative for
    DTK6
  4. Check include paths: /usr/include/dtk5/ for DTK5, /usr/include/dtk6/
    for DTK6
  5. Test Debian packaging with different build profiles (nodtk5, nodtk6,
    nodoc)
  6. Verify CMake configuration files are generated with correct names
  7. Ensure QML plugin installation paths are correct for both Qt5 and Qt6
  8. Test example applications (dtk-exhibition and dtk6-exhibition)
    functionality

refactor: 统一 DTK5 和 DTK6 构建系统

  1. 将自动 DTK 版本检测改为显式 DTK5 选项,实现统一构建配置
  2. 引入 DTK_NAME_SUFFIX 变量区分 DTK5(空)和 DTK6("6")构建
  3. 更新所有 CMake 配置文件以一致使用 DTK_VERSION_MAJOR 和
    DTK_NAME_SUFFIX
  4. 修改 Debian 打包以支持 DTK5 和 DTK6 的独立构建配置
  5. 添加 DTK6 特定的 Debian 包定义和安装脚本
  6. 更新 debian/rules 以处理 DTK5 和 DTK6 的独立构建及版本映射
  7. 修复包含路径、库名称和配置文件名称以遵循 DTK 命名约定
  8. 确保整个构建系统中正确选择 Qt 版本(DTK5 用 Qt5,DTK6 用 Qt6)

Log: 统一构建系统现在支持通过显式配置选项构建 DTK5 和 DTK6

Influence:

  1. 测试使用 DTK5=ON 构建以确保 DTK5 兼容性
  2. 测试使用 DTK5=OFF 构建以确保 DTK6 兼容性
  3. 验证库命名:DTK5 为 dtkdeclarative,DTK6 为 dtk6declarative
  4. 检查包含路径:DTK5 为 /usr/include/dtk5/,DTK6 为 /usr/include/dtk6/
  5. 测试使用不同构建配置(nodtk5、nodtk6、nodoc)的 Debian 打包
  6. 验证 CMake 配置文件是否以正确名称生成
  7. 确保 QML 插件安装路径对 Qt5 和 Qt6 都正确
  8. 测试示例应用程序(dtk-exhibition 和 dtk6-exhibition)的功能

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Dec 29, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#555
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Dec 30, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#555
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Dec 30, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#555
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Dec 30, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#555
1. Replaced automatic DTK version detection with explicit DTK5 option
for unified build configuration
2. Introduced DTK_NAME_SUFFIX variable to differentiate between DTK5
(empty) and DTK6 ("6") builds
3. Updated all CMake configuration files to use DTK_VERSION_MAJOR and
DTK_NAME_SUFFIX consistently
4. Modified Debian packaging to support both DTK5 and DTK6 with separate
build profiles
5. Added DTK6-specific Debian package definitions and installation
scripts
6. Updated debian/rules to handle separate builds for DTK5 and DTK6 with
proper version mapping
7. Fixed include paths, library names, and configuration file names to
follow DTK naming conventions
8. Ensured proper Qt version selection (Qt5 for DTK5, Qt6 for DTK6)
throughout the build system

Log: Unified build system now supports both DTK5 and DTK6 with explicit
configuration options

Influence:
1. Test building with DTK5=ON to ensure DTK5 compatibility
2. Test building with DTK5=OFF to ensure DTK6 compatibility
3. Verify library naming: dtkdeclarative for DTK5, dtk6declarative for
DTK6
4. Check include paths: /usr/include/dtk5/ for DTK5, /usr/include/dtk6/
for DTK6
5. Test Debian packaging with different build profiles (nodtk5, nodtk6,
nodoc)
6. Verify CMake configuration files are generated with correct names
7. Ensure QML plugin installation paths are correct for both Qt5 and Qt6
8. Test example applications (dtk-exhibition and dtk6-exhibition)
functionality

refactor: 统一 DTK5 和 DTK6 构建系统

1. 将自动 DTK 版本检测改为显式 DTK5 选项,实现统一构建配置
2. 引入 DTK_NAME_SUFFIX 变量区分 DTK5(空)和 DTK6("6")构建
3. 更新所有 CMake 配置文件以一致使用 DTK_VERSION_MAJOR 和
DTK_NAME_SUFFIX
4. 修改 Debian 打包以支持 DTK5 和 DTK6 的独立构建配置
5. 添加 DTK6 特定的 Debian 包定义和安装脚本
6. 更新 debian/rules 以处理 DTK5 和 DTK6 的独立构建及版本映射
7. 修复包含路径、库名称和配置文件名称以遵循 DTK 命名约定
8. 确保整个构建系统中正确选择 Qt 版本(DTK5 用 Qt5,DTK6 用 Qt6)

Log: 统一构建系统现在支持通过显式配置选项构建 DTK5 和 DTK6

Influence:
1. 测试使用 DTK5=ON 构建以确保 DTK5 兼容性
2. 测试使用 DTK5=OFF 构建以确保 DTK6 兼容性
3. 验证库命名:DTK5 为 dtkdeclarative,DTK6 为 dtk6declarative
4. 检查包含路径:DTK5 为 /usr/include/dtk5/,DTK6 为 /usr/include/dtk6/
5. 测试使用不同构建配置(nodtk5、nodtk6、nodoc)的 Debian 打包
6. 验证 CMake 配置文件是否以正确名称生成
7. 确保 QML 插件安装路径对 Qt5 和 Qt6 都正确
8. 测试示例应用程序(dtk-exhibition 和 dtk6-exhibition)的功能
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Dec 30, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#555
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

我来对这个diff进行审查,主要关注语法逻辑、代码质量、性能和安全方面:

  1. 版本控制和命名规范改进:
  • 优点:引入了DTK5/DTK6构建选项,通过DTK_NAME_SUFFIX变量统一管理版本后缀,使代码更清晰
  • 建议:DTK5/DTK6的版本号映射逻辑可以进一步优化,目前使用sed命令处理可能不够健壮
  1. CMake配置改进:
  • 优点:移除了对PROJECT_VERSION_MAJOR的直接依赖,改用更明确的DTK_VERSION_MAJOR变量
  • 建议:版本号相关的变量应该集中定义,避免分散在不同位置
  1. 包管理改进:
  • 优点:debian/control文件中增加了对DTK6的支持,使用Build-Profiles进行条件构建
  • 建议:依赖关系可以更精确,比如指定具体的版本范围
  1. 安全性改进:
  • 优点:在debian/rules中增加了安全编译参数(-z relro, -z now等)
  • 建议:可以考虑添加更多的安全编译选项,如-fstack-protector-strong
  1. 性能优化:
  • 优点:添加了-Ofast编译优化选项
  • 建议:应该区分debug和release模式的编译选项
  1. 代码质量改进:
  • 优点:统一了变量命名规范,如DTK_VERSION_MAJOR替代了PROJECT_VERSION_MAJOR
  • 建议:部分CMakeLists.txt文件中的变量引用可以更规范,如使用${}引用变量
  1. 构建系统改进:
  • 优点:支持并行构建DTK5和DTK6版本
  • 建议:可以考虑添加更多的构建选项控制,如可选组件的编译控制
  1. 文档改进:
  • 优点:更新了版本号相关的文档生成配置
  • 建议:可以考虑添加更多的自动化文档生成选项

具体改进建议:

  1. 版本管理:
# 集中定义版本相关变量
set(DTK_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(DTK_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(DTK_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(DTK_VERSION "${DTK_VERSION_MAJOR}.${DTK_VERSION_MINOR}.${DTK_VERSION_PATCH}")
  1. 安全编译选项:
# 在debian/rules中添加
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2
  1. 构建选项控制:
# 添加更多可选组件控制
option(BUILD_EXAMPLES "Build examples" OFF)
option(BUILD_TESTS "Build tests" OFF)
option(BUILD_DOCS "Build documentation" OFF)
  1. 依赖关系精确化:
# 在debian/control中指定版本范围
Depends: libdtk6core (>= 6.0.0), libdtk6core (<< 7.0.0)
  1. 变量引用规范化:
# 统一使用${}引用变量
set(LIB_NAME "dtk${DTK_NAME_SUFFIX}declarative")

这些改进将使代码更加健壮、安全和易维护。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants