Fix macOS AU build setup#31
Open
lpla wants to merge 56 commits into
Open
Conversation
Upstream DPF's CLAP stateLoad reads buffer[i] after restoring the byte at the chunk boundary, which can be uninitialised stack memory; when it happens to be zero, partial keys/values are processed as complete. Fix lives on fix-clap-stateload-chunk-boundary in the fork. Revert .gitmodules to DISTRHO/DPF once the fix lands upstream. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The three UI generation steps (gen-rpc-ts → bundle.js → bundle_data.c) used add_custom_command(OUTPUT ...) rules with timestamp-tracked DEPENDS. Three failure modes kept producing stale builds: - Adding a new ui/*.tsx file didn't enter the glob until a reconfigure. - Schema changes via rpc-schema-dump didn't always propagate through CMake's target-as-dep timestamp comparison. - Per-variant bundle_data.c.o stayed at the old version even after bundle_data.c refreshed. Replace all three rules with one add_custom_target(ui-regenerate ALL). Run every build (~1-2s total). Guard the .c with `cmake -E copy_if_different` so the C compile + plugin link stay incremental when content didn't actually change. Make gen-rpc-ts.js's post-process write-on-change so PluginService.ts mtime stays quiet for IDE consumers. Verified: no-op build leaves binary mtime + hash unchanged; comment-only schema touch produces identical .ts/.c bytes; adding a new tsx + import relinks the plugin without `cmake -S . -B build`. retroplug-tests still passes (23,319 assertions in 64 cases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The first cut of the kit editor failed on three fronts: only 9 of 16 slots visible (column clipped), input dead (keyboard group was empty), and floating scrollbar artifacts (overflow content in nested flex rows). Per a screenshot the user shared, the footer was entirely off-screen. Rewrite as a single vertical flex column (no nested rows) sized to fit a 480x640 window so all 16 slots + section header + sample list + 3 footer rows render without clipping. Request 480x700 on mount via plugin.setWindowSize so the standalone/host can grow the window. Fix the focus-group wiring: items now register synchronously during render via claimRefIdx() instead of the previous closure-captured nextRefIdx that read stale values during JSX construction (causing all refs to be indexed in reverse and the highlight to land on the wrong row). Pattern lifted from MenuOverlay's working setup — refs[], group.add(ref), group.focus(refs[0]), setKeyboardGroup(group). Hand keyboard back to the parent sinkGroup on unmount so the menu/grid receives keys again. Replace non-ASCII glyphs (em-dash, ellipsis, ×) with ASCII equivalents since LVGL's default font renders them as fallback rectangles. Verified end-to-end with the Xvfb harness + RETROPLUG_AUTOLOAD_ROM: the editor opens via menu nav, all 16 slots + footer render, and arrow-key focus moves correctly (slot 03 highlights after 3 Downs). Mouse clicks couldn't be verified under headless Xvfb (DPF's pointer indev doesn't receive xdotool synthetic events for either the menu or the editor), but the onClick wiring is identical to MenuOverlay which works in real desktop sessions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
KitEditor.tsx's last commit showed up as `Bin 19962 -> 20787 bytes` because git's binary heuristic picked up the UTF-8 em-dashes and arrows in inline comments. The file is plain TypeScript; force a text diff so review tooling shows the actual change instead of a binary churn line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picks up the submodule fix that adds LV_OBJ_FLAG_CLICKABLE to Text and
View component constructors. Pointer clicks on those widgets now fire
their onClick handlers — previously hit-testing skipped them and only
the keyboard (focused-widget) dispatch path worked, which is why mouse
input has never functioned anywhere in the UI (menu, kit editor,
emulator tiles).
Verified the rebuild propagates: lvgl-js-native.dir/.../{text,view}.cpp.o
recompile, plugin variants relink. Tests stay green (69 cases / 23 337
assertions). Real-desktop click verification needs to happen in a host
since Xvfb doesn't deliver synthetic mouse events to DPF.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picks up dpf e701bfcb, which repoints its pugl-upstream submodule to tommitytom/pugl feature/detectable-autorepeat. Completes the fix begun in 933b4e8 "Fix key repeat issues" — the JS half was landed there; the X11-side XkbSetDetectableAutoRepeat call lives in pugl and arrives via this bump. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
Thanks for this! I'll give this a proper look over the next couple of days - I'm a bit weary of the changes to DPF since that should already support MacOS and ideally I'd like to not be using a fork of it. Also worth mentioning the dpf branch is a work in progress, there are a lot of missing features. Don't trust your projects to it as you may experience data loss! |
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.
Make the DPF branch build a macOS AU plugin reliably on current macOS.
SDL2.frameworkbefore falling back to pkg-config SDL2.build.shon macOS.tjscbytecode generation to use host-built tools when building Apple target architectures that do not include the host architecture.pb12helper for the host architecture on Apple so arm64-only target builds can still run the helper on Intel hosts.Depends on:
Validation:
retroplug-aufor x86_64 and validated withauval -v aumu RPlg Dstr.retroplug-aufor arm64 using host-builtrpc-schema-dump,tjsc, andretroplug-exportoverrides.retroplug-auas universalx86_64;arm64;lipoconfirmed both slices in the AU binary and helper tools.~/Library/Audio/Plug-Ins/Components/retroplug.component;auval -v aumu RPlg Dstrsucceeded on the Intel host.