Fix macOS startup#117
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the plugin/test dependency on external libpng (which can break macOS plugin loading due to missing png.framework) by switching PNG read/write for ASSERT IMAGE_EQUALS to the vendored stb_image / stb_image_write, and adds CI coverage to catch missing macOS runtime dependencies.
Changes:
- Replace libpng-based PNG load/write with
stbi_load/stbi_write_pngforASSERT IMAGE_EQUALS. - Vendor
stb_image_write.hand centralize stb implementations inc64-script-vm-dispatch-io.c. - Add a reusable macOS smoke-test workflow and run it (plus expanded Windows smoke tests) against multiple OBS versions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/script/test_c64script_compiler.c |
Switch test PNG writer helper to stbi_write_png and always run image-equals tests. |
tests/script/CMakeLists.txt |
Remove find_package(PNG)/libpng linkage for script tests. |
src/video/stb_image_write.h |
Add vendored stb image writer header. |
src/video/c64-logo.c |
Stop defining STB_IMAGE_IMPLEMENTATION here; consume declarations only. |
src/script/vm/c64-script-vm-dispatch-io.c |
Own stb implementations; replace PNG IO and adjust image freeing for stb. |
CMakeLists.txt |
Remove libpng discovery/linkage; document macOS png.framework issue. |
.github/workflows/macos-smoke-test.yaml |
New reusable workflow to validate plugin loads against clean OBS installs. |
.github/workflows/build-project.yaml |
Add macOS smoke-test job; expand Windows smoke tests to a version matrix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #116.
Many thanks to @TheGrue72 for reporting this issue.
Details:
png.h(not available on macOS) withstb_image_write.h(always available since part of the plugin). This dependency was introduced by C64 Script in order to allow for comparing screenshots of the video stream with other images, e.g. as part of C64 Script driven E2E tests.