Add missing "Contents" directory suffix for webots MacOS installations #30
Open
hoeftjch wants to merge 1 commit into
Open
Add missing "Contents" directory suffix for webots MacOS installations #30hoeftjch wants to merge 1 commit into
hoeftjch wants to merge 1 commit into
Conversation
… set to app file only
BlueAndi
approved these changes
Jun 7, 2026
BlueAndi
left a comment
Owner
There was a problem hiding this comment.
The documentation of Webots mention this here, so I think the fix is ok:
https://cyberbotics.com/doc/guide/compiling-controllers-in-a-terminal?version=master
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.
On macOS, Webots is installed as a
.appbundle. The conventionalWEBOTS_HOMEpoints to the bundle root (e.g./Applications/Webots.app), but all headers, sources, and libraries reside one level deeper underContents/. The scripts andlibrary.jsonassumed a flat layout, causingFileNotFoundErroron macOS.Changes
scripts/create_webots_library.py: detect macOS and prepend/Contentsto all paths derived fromWEBOTS_HOMEscripts/copy_webots_shared_libs.py: same fix for the dylib paths inSHARED_FILES_LISTlibrary.json: fix-Lflag fromlib/Webots/lib/controllertolib/Webots/lib(the actual directorycreate_webots_library.pycopies the dylib into)Note: The
webots-controllerexecutable will also expect WEBOTS_HOME to simply point to the *.app file and would fails with the following error when adding "Contents/" to the WEBOTS_HOME variable and would fail with this error: