[LyX/master] Add runpath verification of deployed binaries and plugins

Stephan Witt switt at lyx.org
Mon Jun 24 06:25:01 UTC 2024


commit 740d863f61e3f6f0a4ff88d7a063dedabebef9ef
Author: Stephan Witt <switt at lyx.org>
Date:   Mon Jun 24 08:24:45 2024 +0200

    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
 }
 
 # -------------------------


More information about the lyx-cvs mailing list