Skip to content

Fix macOS startup#117

Merged
chrisgleissner merged 2 commits into
mainfrom
fix/issue-116-macos-startup
May 22, 2026
Merged

Fix macOS startup#117
chrisgleissner merged 2 commits into
mainfrom
fix/issue-116-macos-startup

Conversation

@chrisgleissner

@chrisgleissner chrisgleissner commented May 22, 2026

Copy link
Copy Markdown
Owner

This fixes #116.

Many thanks to @TheGrue72 for reporting this issue.

Details:

  • Replace dependency on png.h (not available on macOS) with stb_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.
  • Improve smoke test coverage against baseline and latest OBS to prevent future regression

Copilot AI review requested due to automatic review settings May 22, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_png for ASSERT IMAGE_EQUALS.
  • Vendor stb_image_write.h and centralize stb implementations in c64-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.

Comment thread src/script/vm/c64-script-vm-dispatch-io.c
Comment thread src/script/vm/c64-script-vm-dispatch-io.c Outdated
Comment thread tests/script/test_c64script_compiler.c Outdated
@chrisgleissner chrisgleissner merged commit af8ce43 into main May 22, 2026
46 checks passed
@chrisgleissner chrisgleissner deleted the fix/issue-116-macos-startup branch May 22, 2026 14:36
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.

Plugin Error when loading OBS

2 participants