Skip to content

Commit

Permalink
Merge pull request #4 from Lazy-Newb-Pack/master
Browse files Browse the repository at this point in the history
addign in miffledmap's changes
  • Loading branch information
BeauBouchard committed Mar 3, 2015
2 parents 3448f54 + c9f60b0 commit 6ad267e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pack/df_linux/dfhack
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 8 additions & 5 deletions pack/df_linux/distro_fixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:}<abspath_to_32bit_libz>";
# 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:}<abspath_to_32bit_libz>";
# 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
Expand Down

0 comments on commit 6ad267e

Please sign in to comment.