Load 32bit libs if they exist with 64bit bin

pull/390/head
FlightlessMango 4 years ago
parent 6cebbba732
commit 4bdd252393

@ -18,4 +18,8 @@ fi
LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@libdir_mangohud@"
exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" "$@"
if hash @mangohud_sh@ 2>/dev/null; then
exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" @mangohud_sh@ "$@"
else
exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" "$@"
fi

@ -155,13 +155,16 @@ configure_file(input : 'mangohud.json.in',
if target_machine.cpu_family() == 'x86_64'
mangohud_cpu_family = ''
mangohud_opposite_bin = 'mangohud.x86'
else
mangohud_cpu_family = '.@0@'.format(target_machine.cpu_family())
#this is probably dumb but works for now
mangohud_opposite_bin = 'intentionally_borked'
endif
configure_file(input : '../bin/mangohud.in',
output : 'mangohud@0@'.format(mangohud_cpu_family),
configuration : {'libdir_mangohud' : libdir_mangohud},
configuration : {'libdir_mangohud' : libdir_mangohud, 'mangohud_sh' : mangohud_opposite_bin},
install_dir : get_option('bindir'),
)

Loading…
Cancel
Save