Skip to content

Add upward OF-path search and missing-binary detection to the GUI - #650

Merged
danoli3 merged 1 commit into
openframeworks:masterfrom
danoli3:of-path-detection-fix
Sep 14, 2026
Merged

danoli3 merged 1 commit into
openframeworks:masterfrom
danoli3:of-path-detection-fix

Conversation

@danoli3

@danoli3 danoli3 commented Sep 11, 2026

Copy link
Copy Markdown
Member

Fixes the Electron frontend’s fragile OF-path detection by adding standalone upward path searching, plus clear errors when the cmdLine binary is missing.
Also fixes and improves the macOS Gatekeeper warning, with testing confirming correct OF detection, error handling, and UI rendering.

@danoli3
danoli3 force-pushed the of-path-detection-fix branch 2 times, most recently from 42efaba to 5eef30f Compare September 14, 2026 07:40
The Electron frontend's own OF-path guess was a single fixed-depth
computation (__dirname/../../../) with no validation - only correct
if frontend/ sits at exactly <OF_ROOT>/apps/projectGenerator/frontend.
Its only real fallback (asking cmdLine via --getofpath, which does a
proper upward search) silently did nothing when the cmdLine binary
wasn't built/copied into frontend/app/ yet, since execFile/spawn just
threw a generic ENOENT with no clear message.

Add isGoodOFPath()/findOFPathUpwards() in the GUI itself (mirroring
the equivalent functions in commandLine/src/main.cpp) so path
detection works standalone, without needing the binary. Also give
every cmdLine-backed IPC call a clear "commandLine binary not found,
build it first" error instead of a bare ENOENT.

Also fixes two bugs found while testing this: the "running on macOS
for the first time" Gatekeeper warning had a hardcoded 400px height
regardless of content, and its trigger check matched any path
starting with "/private" (which includes ordinary /tmp, /var, /etc
paths on macOS, since those are symlinks) instead of the actual
AppTranslocation path Gatekeeper uses.
@danoli3
danoli3 force-pushed the of-path-detection-fix branch from 5eef30f to 198cc68 Compare September 14, 2026 08:16
@danoli3
danoli3 merged commit e303495 into openframeworks:master Sep 14, 2026
5 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