From 740d863f61e3f6f0a4ff88d7a063dedabebef9ef Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Mon, 24 Jun 2024 08:24:45 +0200 Subject: [PATCH] Add runpath verification of deployed binaries and plugins --- development/LyX-Mac-binary-release.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index c68890eb3f..7abe2ccf87 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -895,6 +895,17 @@ convert_universal() { for arch in ${ARCH_LIST} ; do rm -f "${BUNDLE_PATH}"/*-${arch} done + if [ -d "${QtInstallDir}/lib/QtCore.framework/Versions/${QtFrameworkVersion}" -a "yes" = "${qt_deployment}" ]; then + echo Verify runtime path configuration + for file in "${LyxAppPrefix}"/Contents/MacOS/*lyx* $(find "${LyxAppPrefix}"/Contents -name '*.dylib' -print) ; do + echo Check "${file}" + BAD_FRAMEWORKS=$(otool -L "${file}" | grep 'Qt.*framework' | grep -v '@rpath' | sort -u) + if [ -n "${BAD_FRAMEWORKS}" ]; then + echo Bad runtime path configuration in "${file}" for frameworks "${BAD_FRAMEWORKS}" + exit 1 + fi + done + fi } # ------------------------- -- 2.39.5