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}
0 commit comments