Skip to content

Commit cf788a6

Browse files
committed
fix(search_libs): add special handling for libopenh264.so.7 and update library list
1 parent 47a8c66 commit cf788a6

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

automation-tools/search_libs.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# This script searches for shared libraries in specified paths and copies them to a destination directory.
44
# Usage: search_libs <library_list_file>
5-
# Ensure the script is run with a library list file as an argument
65
# Example:
76
# ./search-libs.sh /shared-libs/retrodeck-shared-libs.6.8.txt
87

@@ -28,7 +27,17 @@ search_libs() {
2827
path=$(find "${SEARCH_PATHS[@]}" -type f -name "$lib" 2>/dev/null | head -n 1)
2928
if [ -z "$path" ]; then
3029
path=$(find "${SEARCH_PATHS[@]}" -type f -iname "*$lib*" 2>/dev/null | head -n 1)
31-
[ -z "$path" ] && { echo "❌ Library not found: $lib"; not_found_libs+=("$lib"); need_to_debug=true; continue; }
30+
if [ -z "$path" ]; then
31+
# Special handling: if libopenh264.so.7 is requested, create symlink from .2.5.1 if available
32+
if [ "$lib" == "libopenh264.so.7" ] && [ -f "${FLATPAK_DEST}/lib/libopenh264.so.2.5.1" ]; then
33+
give_libopenh264_warning=true
34+
continue
35+
fi
36+
echo "❌ Library not found: $lib"
37+
not_found_libs+=("$lib")
38+
need_to_debug=true
39+
continue
40+
fi
3241
fi
3342

3443
dest="${FLATPAK_DEST}/lib/$(basename "$path")"
@@ -57,4 +66,12 @@ search_libs() {
5766
echo ""
5867
done
5968
fi
69+
70+
if [ "$give_libopenh264_warning" = true ]; then
71+
echo "⚠️ Warning: You included libopenh264.so.2.5.1, but you also requested libopenh264.so.7."
72+
echo "You may need to create a symlink manually if the application requires it."
73+
echo "We do this because libopenh264.so.7 is usually just a symlink to libopenh264.so.2.5.1 and not a separate library."
74+
echo "LibMan is already instructed to create this symlink, so it should be fine."
75+
echo ""
76+
fi
6077
}

shared-libs/shared-libs-6.8.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ libxcb-cursor.so.0
4242
libxcb-cursor.so.0.0.0
4343
libxcb.so.1
4444
libxcb.so.1.1.0
45-
libopenh264*
4645
libqxcb.so

0 commit comments

Comments
 (0)