-
Notifications
You must be signed in to change notification settings - Fork 150
refactor: unify DTK5 and DTK6 build system #716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#716
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 45,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#716
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 45,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#716
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 45,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#716
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 45,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#716
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 45,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
deepin pr auto review我来对这段代码变更进行审查:
改进建议:
# 建议添加版本检查
if(NOT (DTK5 OR DTK6))
message(FATAL_ERROR "Either DTK5 or DTK6 must be enabled")
endif()
# 建议明确指定C++标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# 建议添加并行编译支持
%:
dh $@ --parallel
# 建议添加更严格的编译器警告
export DEB_CXXFLAGS_MAINT_APPEND += -Wextra -Wpedantic
# 建议添加更多安全编译选项
if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_options(${LIB_NAME} PRIVATE
-fstack-protector-strong
-D_FORTIFY_SOURCE=2
)
endif()
# 建议添加更严格的版本检查
if(NOT PROJECT_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+$")
message(FATAL_ERROR "Invalid version format")
endif()
# 建议使用更严格的依赖检查
find_package(Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} REQUIRED COMPONENTS ...)这些改进将有助于:
总的来说,这次代码变更质量较高,主要改进了版本控制和构建系统的组织,但还可以在安全性、依赖管理和版本检查方面进一步加强。 |
1. Replaced version-based detection with explicit DTK5/DTK6 build option 2. Added DTK5 option (default ON) to control which version to build 3. Modified CMake configuration to handle both DTK5 and DTK6 builds 4. Updated Debian packaging to support both DTK5 and DTK6 packages 5. Added separate build directories and profiles for DTK5/DTK6 6. Updated library naming conventions with proper suffixes 7. Modified installation paths to include version-specific directories 8. Updated pkg-config and CMake configuration files for both versions 9. Ensured proper Qt version selection based on DTK version Log: Added support for building both DTK5 and DTK6 versions from same codebase Influence: 1. Test building with DTK5=ON (default) to ensure DTK5 compatibility 2. Test building with DTK5=OFF to verify DTK6 support 3. Verify Debian package generation for both DTK5 and DTK6 variants 4. Test installation paths for both versions (dtk5/ vs dtk6/ directories) 5. Verify pkg-config files work correctly for both versions 6. Test CMake find_package for both Dtk5Widget and Dtk6Widget 7. Ensure examples and plugins build correctly with both versions 8. Verify translation files are installed to correct locations refactor: 统一DTK5和DTK6构建系统 1. 将基于版本的检测替换为明确的DTK5/DTK6构建选项 2. 添加DTK5选项(默认开启)控制构建哪个版本 3. 修改CMake配置以处理DTK5和DTK6构建 4. 更新Debian打包以支持DTK5和DTK6包 5. 为DTK5/DTK6添加独立的构建目录和配置文件 6. 更新库命名规范,添加适当的后缀 7. 修改安装路径以包含版本特定的目录 8. 更新pkg-config和CMake配置文件以支持两个版本 9. 确保根据DTK版本正确选择Qt版本 Log: 新增从同一代码库构建DTK5和DTK6版本的支持 Influence: 1. 测试使用DTK5=ON(默认)构建,确保DTK5兼容性 2. 测试使用DTK5=OFF构建,验证DTK6支持 3. 验证Debian包生成,确保DTK5和DTK6变体都能正确打包 4. 测试两个版本的安装路径(dtk5/与dtk6/目录) 5. 验证pkg-config文件在两个版本中都能正常工作 6. 测试CMake find_package对Dtk5Widget和Dtk6Widget的支持 7. 确保示例和插件在两个版本中都能正确构建 8. 验证翻译文件安装到正确的位置
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#716
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5"
]
}
}
} |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtkwidget\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | 6e2fa4cc96"
}
],
"docs/CMakeLists.txt": [
{
"line": "execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1",
"line_number": 45,
"rule": "S35",
"reason": "Url link | d2deace9b0"
}
]
} |
Log: Added support for building both DTK5 and DTK6 versions from same
codebase
Influence:
directories)
refactor: 统一DTK5和DTK6构建系统
Log: 新增从同一代码库构建DTK5和DTK6版本的支持
Influence: