Mantis Bug Tracker

View Revisions: Issue #6394 Back to Issue ]
Summary 0006394: "df" script does not pass command-line arguments correctly (i.e. for world generation) on OS X/Linux
Revision 2014-07-25 11:06 by lethosor
Description On OS X:
* Running "./df -gen ..." simply opens DF normally (and does not generate a world).
* Running "./dwarfort.exe -gen ..." crashes, since the library variables were not set by the "df" script.
On Linux, spaces in arguments aren't recognized properly (as mentioned in the 0.34.11 release notes).
Revision 2014-07-25 11:06 by lethosor
Additional Information This can be fixed on OS X and Linux by changing the last line of the script to './dwarfort.exe "$@" ' and './libs/Dwarf_Fortress "$@" ' (respectively)
Revision 2014-07-25 11:06 by lethosor
Description On OS X:
* Running "./df -gen ..." simply opens DF normally (and does not generate a world).
* Running "./dwarfort.exe -gen ..." crashes, since the library variables were not set by the "df" script. (I'm not sure if this is a problem on 10.6, since the workaround in the "df" script is for 10.7+)
On Linux, spaces in arguments aren't recognized properly (as mentioned in the 0.34.11 release notes).
Revision 2014-07-25 06:21 by lethosor
Description * Running "./df -gen ..." simply opens DF normally (and does not generate a world).
* Running "./dwarfort.exe -gen ..." crashes, since the library variables were not set by the "df" script. (I'm not sure if this is a problem on 10.6, since the workaround in the "df" script is for 10.7+)
This is relatively easy to fix (see below)
Revision 2014-07-25 06:21 by lethosor
Additional Information I have found two workarounds so far:
Option 1 (easiest): Edit the "df" script and add "$@" to the end of the last line:
cd "${PWD}"; ./dwarfort.exe "$@"

(the "$*" passes all command-line arguments from df to dwarfort.exe)
Option 2: Run this section of the "df" script in the DF directory (on the command line):
  OSREV=`uname -r | cut -d. -f1`
  if [ "$OSREV" -ge 11 ] ; then
          export DYLD_LIBRARY_PATH=${PWD}/libs
          export DYLD_FRAMEWORK_PATH=${PWD}/libs
  else
          export DYLD_FALLBACK_LIBRARY_PATH=${PWD}/libs
          export DYLD_FALLBACK_FRAMEWORK_PATH=${PWD}/libs
  fi

(This sets the library variables that "./dwarfort.exe -gen ..." needs to run correctly.)
I'm assuming the reason this went unnoticed is because the SDL libraries are located somewhere where dwarfort.exe can find them without the need for the "df" script.
Revision 2014-05-09 14:59 by lethosor
Additional Information I have found two workarounds so far:
Option 1 (easier): Edit the "df" script and add "$*" to the end of the last line:
cd "${PWD}"; ./dwarfort.exe $*
(the "$*" passes all command-line arguments from df to dwarfort.exe)
Option 2: Run this section of the "df" script in the DF directory (on the command line):
  OSREV=`uname -r | cut -d. -f1`
  if [ "$OSREV" -ge 11 ] ; then
          export DYLD_LIBRARY_PATH=${PWD}/libs
          export DYLD_FRAMEWORK_PATH=${PWD}/libs
  else
          export DYLD_FALLBACK_LIBRARY_PATH=${PWD}/libs
          export DYLD_FALLBACK_FRAMEWORK_PATH=${PWD}/libs
  fi
This sets the library variables that "./dwarfort.exe -gen ..." needs to run correctly.


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker