Skip to content

Commit b9ce913

Browse files
committed
AppImage: include libOpenGL.so.0 fallback
Currently Ubuntu 25.10 live DVD (ubuntu-25.10-desktop-amd64.iso) does not include the library, preventing the GUI from being run. On the other hand, if used unconditionally, it causes the warning (even in the U25.10) for which it was removed: <linuxdeploy/linuxdeploy#152> So preload the library if is in the system and use the bundled just as a fallback.
1 parent ff62efd commit b9ce913

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

data/scripts/Linux-AppImage/AppRun

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ setup_wayland
368368
# while portaudio is linked directly to JACK library
369369
set_ld_preload ultragrid_aplay_portaudio.so libjack
370370
set_ld_preload ultragrid_vidcap_pipewire.so libpipewire
371+
set_ld_preload_exe "$AI_LIB_PATH/../bin/uv-qt" libOpenGL.so.0
371372

372373
## @param $@ <tool> <arguments
373374
setup_firejail() {

data/scripts/Linux-AppImage/create-appimage.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ for n in $EXCLUDE_LIST; do
149149
if [ "$n" = libjack.so.0 ] || [ "$n" = libpipewire-0.3.so.0 ]; then
150150
continue
151151
fi
152+
# not included in U25.10 live
153+
if [ "$n" = libOpenGL.so.0 ]; then
154+
continue
155+
fi
152156
if [ -f "$APPPREFIX/lib/$n" ]; then
153157
rm "$APPPREFIX/lib/$n"
154158
fi

data/scripts/Linux-AppImage/scripts/preload.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@ get_loader() {
1616
#
1717
set_ld_preload() {
1818
ug_module_lib=$AI_LIB_PATH/ultragrid/$1
19-
if [ ! -f "$ug_module_lib" ]; then
19+
set_ld_preload_exe "$ug_module_lib" "$2"
20+
}
21+
22+
set_ld_preload_exe() {
23+
bin=${1?}
24+
if [ ! -f "$bin" ]; then
2025
return
2126
fi
2227
loader=$(get_loader)
2328
if [ ! -x "$loader" ]; then
2429
return
2530
fi
26-
system_lib=$(LD_TRACE_LOADED_OBJECTS=1 $loader "$ug_module_lib" | grep "$2" | grep -v 'not found' | awk '{print $3}')
31+
system_lib=$(LD_TRACE_LOADED_OBJECTS=1 $loader "$bin" | grep "$2" |
32+
grep -v 'not found' | awk '{print $3}')
2733
if [ -n "$system_lib" ]; then
2834
export LD_PRELOAD="$system_lib"${LD_PRELOAD:+":$LD_PRELOAD"}
2935
fi

0 commit comments

Comments
 (0)