Changes LD_LIBRARY_PATH to fix AppImage CI builds

This commit is contained in:
Dmitry Vedenko
2022-04-11 17:50:59 +03:00
committed by Avery King
parent 7323aebfe6
commit 4fa6673464

View File

@@ -92,11 +92,23 @@ ln -sf share/icons/hicolor/scalable/apps/saucedacity.svg "${appdir}/.DirIcon"
# them to LD_LIBRARY_PATH so that linuxdeploy can find them.
export LD_LIBRARY_PATH="${appdir}/usr/lib/saucedacity:${LD_LIBRARY_PATH-}"
# When running on GitHub actions - libararies are sometimes installed into the DEB_HOST_MULTIARCH
# based location
if [ -f "/etc/debian_version" ]; then
archDir=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
export LD_LIBRARY_PATH="${appdir}/usr/lib/${archDir}:${appdir}/usr/lib/${archDir}/audacity:${LD_LIBRARY_PATH-}"
fi
# Prevent linuxdeploy setting RUNPATH in binaries that shouldn't have it
mv "${appdir}/bin/findlib" "${appdir}/../findlib"
linuxdeploy --appdir "${appdir}" # add all shared library dependencies
rm -R "${appdir}/lib/audacity"
rm -Rf "${appdir}/lib/audacity"
if [ -f "/etc/debian_version" ]; then
archDir=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
rm -Rf "${appdir}/lib/${archDir}/audacity"
fi
# Put the non-RUNPATH binaries back
mv "${appdir}/../findlib" "${appdir}/bin/findlib"
@@ -134,7 +146,7 @@ unwanted_files=(
fallback_libraries=(
libatk-1.0.so.0 # This will possibly prevent browser from opening
libatk-bridge-2.0.so.0
libatk-bridge-2.0.so.0
libcairo.so.2 # This breaks FFmpeg support
libcairo-gobject.so.2
libjack.so.0 # https://github.com/LMMS/lmms/pull/3958