macOS - Improved source validation on copying of Qt frameworks to app bundle.

This commit is contained in:
Stephan Witt 2023-06-14 08:17:10 +02:00
parent f7e625d7ce
commit 789da12d31

View File

@ -803,14 +803,17 @@ EOF
cp -p "${libname}" "${condir}/PlugIns/${dirname}"
done
fi
echo Copy frameworks ${QtLibraries} ...
for libnm in ${QtLibraries} ; do
fwdir=$(framework_name "$libnm")
dirname=$(dirname "${fwdir}")
mkdir -p "${condir}/${dirname}"
dirname=$(basename "${fwdir}")
libpath="${source}/lib/${dirname}"
if [ -d "${libpath}" ]; then
test -d "${condir}/${fwdir}" || (
echo Copy framework "${source}/lib/"$(basename "${fwdir}")
cp -pR "${source}/lib/"$(basename "${fwdir}") "${condir}/${fwdir}"
echo Copy framework "${libpath}"
cp -pR "${libpath}" "${condir}/${fwdir}"
rm -f "${condir}/${fwdir}/${libnm}"_debug "${condir}/${fwdir}/${version}${libnm}"_debug
test -f "${condir}/${fwdir}/${libnm}".prl && mv "${condir}/${fwdir}/${libnm}".prl "${condir}/${fwdir}"/Resources
test -f "${condir}/${fwdir}/${libnm}"_debug.prl && mv "${condir}/${fwdir}/${libnm}"_debug.prl "${condir}/${fwdir}"/Resources
@ -838,6 +841,9 @@ EOF
"${source}/lib/${dirname}/${version}${libnm}"\
"@executable_path/../${fwdir}/${version}${libnm}"\
"${target}"
else
echo Warning: Cannot copy framework for "$libnm" ... missing source "${libpath}"
fi
done
if [ -d "${source}"/translations ]; then
if [ ! -d "${condir}/translations" ]; then