Skip to content

fix: build error on Windows#400

Open
kt286 wants to merge 3 commits into
linuxdeepin:masterfrom
kt286:fix/build_on_msys2
Open

fix: build error on Windows#400
kt286 wants to merge 3 commits into
linuxdeepin:masterfrom
kt286:fix/build_on_msys2

Conversation

@kt286

@kt286 kt286 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

fix build error on Windows

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @kt286, 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
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kt286

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

Copy link
Copy Markdown
Contributor

Hi @kt286. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1520,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1520,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1520,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

@kt286 kt286 changed the title fix: build error on Windows (WIP)fix: build error on Windows Jul 15, 2026
@kt286
kt286 force-pushed the fix/build_on_msys2 branch from d8a077b to 1403e97 Compare July 15, 2026 06:47
@github-actions

Copy link
Copy Markdown
Contributor
  • 检测到敏感词export变动
详情
    {
    "export": {
        "dtkgui.cmake": {
            "b": [
                "  set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols\")"
            ]
        }
    }
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1520,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

@kt286
kt286 force-pushed the fix/build_on_msys2 branch from 1403e97 to 20ebe00 Compare July 16, 2026 04:45
@github-actions

Copy link
Copy Markdown
Contributor
  • 检测到敏感词export变动
详情
    {
    "export": {
        "dtkgui.cmake": {
            "b": [
                "  set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols\")"
            ]
        }
    }
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1526,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

@kt286 kt286 changed the title (WIP)fix: build error on Windows fix: build error on Windows Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor
  • 检测到敏感词export变动
详情
    {
    "export": {
        "dtkgui.cmake": {
            "b": [
                "  set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols\")"
            ]
        }
    }
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1526,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

@deepin-bot

deepin-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 6.7.46
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #401

- Guard Linux-only dependencies (WaylandClient, XCB, Treeland, librsvg, DConfig) behind platform checks to avoid build failures on Windows
- Add LIBDTKGUISHARED_EXPORT macro with proper dllexport/dllimport for Windows, replacing Q_GUI_EXPORT and LIBDTKCORESHARED_EXPORT
- Export all symbols on MinGW via --export-all-symbols linker flag
- Wrap DBus calls, XCB headers, and dde-kwin-debug with Q_OS_UNIX/Q_OS_LINUX
- Provide stub implementations for DPlatformWindowInterface blur and no-titlebar methods on Windows
- Make librsvg optional via DTK_DISABLE_LIBRSVG
- Update copyright years to 2026
@kt286
kt286 force-pushed the fix/build_on_msys2 branch from a700a8e to afae8c2 Compare July 17, 2026 03:12
@github-actions

Copy link
Copy Markdown
Contributor
  • 检测到敏感词export变动
详情
    {
    "export": {
        "dtkgui.cmake": {
            "b": [
                "  set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols\")"
            ]
        }
    }
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1511,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

…ences on Linux

dsvgrenderer.cpp checks #ifdef Q_OS_LINUX before including any Qt header,
so the Q_OS_LINUX macro (defined in qglobal.h) is never evaluated, causing
the entire file to be preprocessed away and leaving DSvgRenderer symbols
undefined at link time.
@github-actions

Copy link
Copy Markdown
Contributor
  • 检测到敏感词export变动
详情
    {
    "export": {
        "dtkgui.cmake": {
            "b": [
                "  set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols\")"
            ]
        }
    }
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1511,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

@BLumia BLumia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

现状大致看着还行。 @18202781743 也瞅瞅

bool DPlatformWindowInterface::enableBlurWindow() const
{
#ifdef Q_OS_WIN
return m_enableBlurWindow;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

咦?windows下支持这个的吗?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

其实我也不太懂 反正能编译通过就是了

Comment on lines +19 to +25
#if defined(DTK_STATIC_LIB)
# define LIBDTKGUISHARED_EXPORT
#elif defined(LIBDTKGUI_LIBRARY)
# define LIBDTKGUISHARED_EXPORT Q_DECL_EXPORT
#else
# define LIBDTKGUISHARED_EXPORT Q_DECL_IMPORT
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

我觉得不block本PR,不过这个是不是后续用CMake的generate_export_header好一点?

@BLumia
BLumia requested a review from 18202781743 July 17, 2026 05:21
- Conditionally compile DConfig code behind D_DISABLE_DCONFIG macro with DTK_DCONFIG_PTR abstraction for MSYS2/Windows builds

- Remove duplicate QDBus, QDir, QLockFile, QDirIterator, and DPathBuf includes in dguiapplicationhelper.cpp
@github-actions

Copy link
Copy Markdown
Contributor
  • 检测到敏感词export变动
详情
    {
    "export": {
        "dtkgui.cmake": {
            "b": [
                "  set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols\")"
            ]
        }
    }
}

@github-actions

Copy link
Copy Markdown
Contributor
  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/kernel/dguiapplicationhelper.cpp": [
        {
            "line": "    QString socket_key = \"_d_dtk_single_instance_\";",
            "line_number": 1511,
            "rule": "S106",
            "reason": "Var naming | 2ad926d35b"
        }
    ]
}

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants