Skip to content

Commit 4128f7f

Browse files
committed
Fix the macOS app not finding librtcheck.dylib outside the build tree, and smoke test the release zips
1 parent aabea03 commit 4128f7f

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎.github/workflows/build.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,18 @@ jobs:
166166
working-directory: ${{ env.APP_DIR }}
167167
run: 7z a -aoa -tzip ${{ env.ZIP_FILE_NAME }} ${{ matrix.app }}
168168

169+
# Run the packaged app away from the build tree, as a user would, so anything
170+
# that only resolves on the build machine (e.g. a dylib rpath) fails here
171+
# rather than in a published release.
172+
- name: Smoke test the zip
173+
shell: bash
174+
run: |
175+
mkdir -p "$RUNNER_TEMP/smoke"
176+
7z x -y -o"$RUNNER_TEMP/smoke" "${{ env.APP_DIR }}/${{ env.ZIP_FILE_NAME }}" > /dev/null
177+
cd "$RUNNER_TEMP/smoke"
178+
chmod +x ${{ matrix.test-binary }}
179+
${{ matrix.test-binary }} --version
180+
169181
- name: Upload zip files
170182
uses: actions/upload-artifact@v4
171183
with:

‎CHANGELIST.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Fixed false failures in the "Plugin state restoration" test where the first parameter was compared against the last value sent by a previous test rather than the plugin's own value
2222
- Below strictness level 8, two-step (on/off) parameters are now only sent 0 or 1 when tests randomise parameter values. Arbitrary values are still sent to them at level 8 and above, and to all other parameters at every level
2323
- Fixed the "Plugin state restoration" test's exact binary state comparison never running. It was documented as running at strictness level 8 and above but checked the test's own level instead of the run's
24+
- Fixed the macOS app failing to start on any machine other than the one that built it ("Library not loaded: @rpath/librtcheck.dylib"); this affected the `v2.0.0-beta1` and `v2.0.0-beta2` releases
2425
- Enabled the editor stress and extreme (real-time allocation / oversized block) tests that were present in the source tree but had not been compiled into the build
2526

2627
### 1.0.5

‎CMakeLists.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ if (PLUGINVAL_ENABLE_RTCHECK)
238238
rtcheck)
239239

240240
if (APPLE)
241+
# The dylib is copied into the app bundle (below), so also look for it there.
242+
# Otherwise the only rpath is the build tree's, and the app only starts on the
243+
# machine that built it.
244+
set_target_properties(pluginval PROPERTIES BUILD_RPATH "@executable_path/../Libraries")
245+
241246
add_custom_command(TARGET pluginval POST_BUILD
242247
COMMAND ${CMAKE_COMMAND} -E echo "Executable path: $<TARGET_FILE_DIR:pluginval>")
243248
add_custom_command(TARGET pluginval POST_BUILD

0 commit comments

Comments
 (0)