Skip to content

Commit 97e738a

Browse files
committed
AppImage: bundle JACK fallback library correctly
1 parent 71dbfb5 commit 97e738a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cmake/linux/package_linux.sh.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,16 @@ rm -f "${APPDIR}/usr/lib/libwine.so.1"
175175
# Use system-provided carla
176176
rm -f "${APPDIR}usr/lib/"libcarla*.so
177177

178-
# Move jack out of LD_LIBRARY_PATH
178+
# Remove bundled jack in LD_LIBRARY_PATH if exists
179179
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
180+
rm "${APPDIR}/usr/lib/libjack.so.0"
181+
fi
182+
183+
# Bundle jack out of LD_LIBRARY_PATH
184+
JACK_LIB=$(ldd "${APPDIR}/usr/bin/lmms" | sed -n 's/\tlibjack\.so\.0 => \(.\+\) (0x[0-9a-f]\+)/\1/p')
185+
if [ -e "$JACK_LIB" ]; then
180186
mkdir -p "${APPDIR}usr/lib/lmms/optional/"
181-
mv "${APPDIR}/usr/lib/libjack.so.0" "${APPDIR}usr/lib/lmms/optional/"
187+
cp "$JACK_LIB" "${APPDIR}usr/lib/lmms/optional/"
182188
fi
183189

184190
# Point the AppRun to the shim launcher

0 commit comments

Comments
 (0)