Skip to content

Commit 4aacd04

Browse files
committed
fix(assembler, search_libs): enhance archive handling and update library search paths
1 parent 8e5704b commit 4aacd04

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

automation-tools/assembler.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ manage_appimage() {
338338
local appimage_path=""
339339

340340
# Handle archives
341-
if [[ "$output_path" =~ \.tar(\.(gz|xz|bz2))?$ || "$output_path" =~ \.7z$ ]]; then
341+
if [[ "$output_path" =~ \.tar(\.(gz|xz|bz2))?$ || "$output_path" =~ \.7z$ || "$output_path" =~ \.zip$ ]]; then
342342
log i "Extracting archive to temp..." "$logfile"
343343
if [[ "$output_path" =~ \.7z$ ]]; then
344344
7z x -y "$output_path" -o"$temp_root" > /dev/null || {
@@ -911,7 +911,9 @@ process_libraries_manual() {
911911
log i "Performing manual library processing..." "$logfile"
912912
mkdir -p "$lib_dir"
913913

914-
local search_paths=("/app" "/usr/lib" "/usr/lib64" "/lib" "/lib64")
914+
# Add local component paths first, then system paths (use absolute paths)
915+
local component_lib_dir="$(realpath -m "$component/lib" 2>/dev/null)"
916+
local search_paths=("$lib_dir" "$component_lib_dir" "/app" "/usr/lib" "/usr/lib64" "/lib" "/lib64")
915917

916918
while IFS= read -r line; do
917919
# Skip empty lines and comments

automation-tools/search_libs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
# ./search-libs.sh /shared-libs/retrodeck-shared-libs.6.8.txt
77

88
search_libs() {
9-
SEARCH_PATHS=(/app /usr/lib /usr/lib64)
9+
# Add local component paths first, then system paths
10+
# Use absolute paths to avoid confusion
11+
local component_lib_dir="$(realpath -m "${FLATPAK_DEST}/../lib" 2>/dev/null)"
12+
local artifacts_lib_dir="$(realpath -m "${FLATPAK_DEST}/lib")"
13+
14+
SEARCH_PATHS=("$artifacts_lib_dir" "$component_lib_dir" /app /usr/lib /usr/lib64)
1015
mkdir -p "${FLATPAK_DEST}/lib/"
1116

1217
lib_list="$1"

0 commit comments

Comments
 (0)