feat: add unified build system for DTK5 and DTK6#358
feat: add unified build system for DTK5 and DTK6#35818202781743 merged 1 commit intolinuxdeepin:masterfrom
Conversation
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#358
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 48,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#358
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 48,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#358
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 48,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
archlinux/PKGBUILD
Outdated
| -DCMAKE_INSTALL_LIBDIR=lib \ | ||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| -DCMAKE_BUILD_TYPE=Release \ |
There was a problem hiding this comment.
这个地方,根据晏然的说法,在archlinux上打包,CMAKE_BUILD_TYPE应该指定为None。
1. Added DTK5 build option to CMakeLists.txt to support both DTK5 (Qt5) and DTK6 (Qt6) builds 2. Modified CMake configuration to use DTK_VERSION_MAJOR and DTK_NAME_SUFFIX variables for version-specific naming 3. Updated Debian packaging to support separate DTK5 and DTK6 packages with proper build profiles 4. Enhanced debian/rules to handle parallel builds for both DTK versions with separate build directories 5. Modified all CMake configuration files to use DTK_NAME_SUFFIX instead of DTK_VERSION_MAJOR for naming consistency 6. Updated include paths, library names, and configuration files to support both DTK5 and DTK6 variants 7. Added new Debian package files for DTK6: libdtk6gui, libdtk6gui-bin, and libdtk6gui-dev 8. Modified Arch Linux PKGBUILD to explicitly enable DTK5 build option Log: Added support for building both DTK5 (Qt5) and DTK6 (Qt6) versions of DTK GUI library Influence: 1. Test building both DTK5 and DTK6 versions using CMake with -DDTK5=ON/ OFF 2. Verify Debian package builds with different build profiles (nodtk5, nodtk6) 3. Check that DTK5 packages install to dtk5/ directories and DTK6 to dtk6/ directories 4. Test that examples and tools build correctly for both versions 5. Verify library naming: libdtkgui.so.5* for DTK5 and libdtk6gui.so.6* for DTK6 6. Test CMake configuration files for both versions work correctly 7. Verify pkg-config files are generated with correct names and dependencies feat: 添加DTK5和DTK6统一构建系统 1. 在CMakeLists.txt中添加DTK5构建选项,支持同时构建DTK5(Qt5)和 DTK6(Qt6)版本 2. 修改CMake配置,使用DTK_VERSION_MAJOR和DTK_NAME_SUFFIX变量进行版本特定 的命名 3. 更新Debian打包配置,支持独立的DTK5和DTK6软件包,并设置正确的构建配置 文件 4. 增强debian/rules文件,支持为两个DTK版本使用独立的构建目录进行并行构建 5. 修改所有CMake配置文件,使用DTK_NAME_SUFFIX代替DTK_VERSION_MAJOR以确保 命名一致性 6. 更新包含路径、库名称和配置文件以支持DTK5和DTK6变体 7. 为DTK6添加新的Debian软件包文件:libdtk6gui、libdtk6gui-bin和 libdtk6gui-dev 8. 修改Arch Linux PKGBUILD以显式启用DTK5构建选项 Log: 新增支持构建DTK GUI库的DTK5(Qt5)和DTK6(Qt6)版本 Influence: 1. 测试使用CMake构建DTK5和DTK6版本,使用-DDTK5=ON/OFF参数 2. 验证使用不同构建配置文件(nodtk5、nodtk6)的Debian软件包构建 3. 检查DTK5软件包是否安装到dtk5/目录,DTK6安装到dtk6/目录 4. 测试示例程序和应用工具是否正确构建两个版本 5. 验证库命名:DTK5为libdtkgui.so.5*,DTK6为libdtk6gui.so.6* 6. 测试两个版本的CMake配置文件是否正确工作 7. 验证pkg-config文件是否生成正确的名称和依赖关系
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#358
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 48,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
deepin pr auto review我来对这个git diff进行代码审查。主要关注语法逻辑、代码质量、性能和安全等方面。
# 旧版本
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION)
string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION)
set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "define project version")
# 新版本
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" FILE_VERSION)
string(STRIP "${FILE_VERSION}" FILE_VERSION)改进:变量命名更清晰,去掉了冗余的CACHE标记。
# 旧版本
if("${PROJECT_VERSION_MAJOR}" STREQUAL "5")
set(QT_VERSION_MAJOR "5")
elseif("${PROJECT_VERSION_MAJOR}" STREQUAL "6")
set(QT_VERSION_MAJOR "6")
set(DTK_VERSION_MAJOR "6")
else()
message(SEND_ERROR "not support Prject Version ${PROJECT_VERSION}.")
endif()
# 新版本
option(DTK5 "Build DTK5." ON)
if(DTK5)
set(DTK_VERSION_MAJOR "5")
set(DTK_NAME_SUFFIX "")
else()
set(DTK_VERSION_MAJOR "6")
set(DTK_NAME_SUFFIX "6")
endif()改进:
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}")改进:将版本号拆分处理,更灵活且易于维护。
# tests/CMakeLists.txt
# 旧版本
target_compile_options(${BIN_NAME} PRIVATE -fno-access-control -fsanitize=address)
target_link_options(${BIN_NAME} PRIVATE -fsanitize=address)
# 新版本
target_compile_options(${BIN_NAME} PRIVATE -fno-access-control)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_options(${BIN_NAME} PRIVATE -fsanitize=address)
target_link_options(${BIN_NAME} PRIVATE -fsanitize=address)
endif()改进:将sanitizer选项限制在Debug构建中,避免在Release版本中引入不必要的性能开销。
# 旧版本
set(TARGET ${BIN_NAME}${DTK_VERSION_MAJOR})
# 新版本
set(TARGET ${BIN_NAME}${DTK_NAME_SUFFIX})改进:使用DTK_NAME_SUFFIX替代直接使用版本号,命名更规范。 建议:
这些改动整体上是积极的,提高了代码的可维护性和灵活性,同时保持了向后兼容性。新的构建系统更清晰地支持DTK5和DTK6的并行构建。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, asterwyx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
and DTK6 (Qt6) builds
DTK_NAME_SUFFIX variables for version-specific naming
with proper build profiles
with separate build directories
of DTK_VERSION_MAJOR for naming consistency
support both DTK5 and DTK6 variants
and libdtk6gui-dev
Log: Added support for building both DTK5 (Qt5) and DTK6 (Qt6) versions
of DTK GUI library
Influence:
OFF
nodtk6)
dtk6/ directories
for DTK6
dependencies
feat: 添加DTK5和DTK6统一构建系统
DTK6(Qt6)版本
的命名
文件
命名一致性
libdtk6gui-dev
Log: 新增支持构建DTK GUI库的DTK5(Qt5)和DTK6(Qt6)版本
Influence: