diff --git a/pack/df_linux/dfhack b/pack/df_linux/dfhack index fddfea0..e1d3691 100755 --- a/pack/df_linux/dfhack +++ b/pack/df_linux/dfhack @@ -45,7 +45,7 @@ source "./distro_fixes.sh" "${DF_DIR}" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"./hack/libs":"./hack" -PRELOAD_LIB="$PRELOAD_LIB:./hack/libdfhack.so" +PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}./hack/libdfhack.so" case "$1" in -g | --gdb) diff --git a/pack/df_linux/distro_fixes.sh b/pack/df_linux/distro_fixes.sh index 0b8a125..d5ad1b3 100755 --- a/pack/df_linux/distro_fixes.sh +++ b/pack/df_linux/distro_fixes.sh @@ -64,13 +64,16 @@ if [ x"$DF_ARCH" == x'32-bit' ] && [ x"$ARCH" == x'x86_64' ]; then if [ x"$OS" == x'Fedora' ]; then export PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}/usr/lib/libz.so.1"; dlog "INFO" "32 bit df on $OS/64bit detected. Will set LD_PRELOAD to $PRELOAD_LIB...." - # Add your distro here... - elif [ x"$OS" == x'MyFooDistro' ]; then - export PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}"; + # Gentoo 2.2 + elif [ x"$OS" == x'Gentoo' ]; then + export PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}/lib32/libz.so.1"; dlog "INFO" "32 bit df on $OS/64bit detected. Will set LD_PRELOAD to $PRELOAD_LIB...." + # Add your distro here... + # elif [ x"$OS" == x'MyFooDistro' ]; then + # export PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}"; + # dlog "INFO" "32 bit df on $OS/64bit detected. Will set LD_PRELOAD to $PRELOAD_LIB...." else - dlog "WARN" "32bit 'Dwarf_Fortress' on 64bit OS detected. see $0 script for fix using LD_PRELOAD." - + dlog "WARN" "32bit 'Dwarf_Fortress' on 64bit OS detected. If you get 'missing file' errors, please open an issue on Github." fi fi