Skip to content

fix(glfw): complete Windows link dependencies and add native smoke test - #538

Merged
Sunrisepeak merged 5 commits into
mainfrom
fix/glfw-windows-tests
Oct 17, 2026
Merged

Sunrisepeak merged 5 commits into
mainfrom
fix/glfw-windows-tests

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Direct use of compat.glfw on Windows fails to link: GLFW's own Win32 sources reference User32 window/input APIs and Shell32 drag/drop APIs, but the package declared only GDI32. The initial Windows CI run reproduced unresolved LoadCursorW, CreateWindowExW, RegisterClassExW, and DragAcceptFiles in GLFW objects (failure log).

Add user32 and shell32 to windows.runtime.libraries, retaining dialect-neutral linking. These calls belong to GLFW; CMake's Windows defaults previously concealed the missing declarations. Do not add import libraries for APIs GLFW dynamically loads or for application OpenGL/Vulkan calls. Keep existing package versions and the upstream GLFW 3.4 archive/hash/mirrors. Source is unchanged; xpkg refreshes the descriptor without a version bump. The new example consumes 3.4.

Add standalone tests/examples/glfw, consuming only GLFW from this checkout. It asserts Null-platform window behavior on all platforms; on Windows it additionally requires the native Win32 backend and creates/checks/destroys a hidden window. It uses GLFW_NO_API and no application graphics API calls, and fails on initialization errors.

Validation: local mcpp test -p glfw with CI-pinned mcpp 2026.10.1.2 passed (1 passed, 0 failed). All applicable latest PR CI checks passed: Windows native build/link/window execution using compat.glfw 3.4, Linux default and LLVM, macOS, lint, CN mirror reachability, graphics install side effects, and site build.

The smoke window uses 640×480 to accommodate the native Windows minimum window size. Initialization and native-window assertions remain mandatory.

@Sunrisepeak Sunrisepeak changed the title test(glfw): verify standalone Windows compile, link and window behavior fix(glfw): complete Windows link dependencies and add native smoke test Oct 17, 2026
@Sunrisepeak
Sunrisepeak merged commit b863082 into main Oct 17, 2026
17 checks passed
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.

1 participant