Lazy-Newb-Pack / Lazy-Newb-Pack-Linux

A Lazy Newb Pack for Linux
http://lazynewbpack.com/
150 stars 12 forks source link

Launching Dwarf Therapist fails if spaces in path #61

Closed MikkoMMM closed 5 years ago

MikkoMMM commented 5 years ago

When trying to launch Dwarf Therapist from Lazy Newb Pack, I got a popup saying:

ERROR: not found. Verify $_DT_BINARY defined in /mnt/lvdata/games/linux/Dwarf /mnt/lvdata/games/linux/Dwarf Fortress LinuxLNP-0.44.12-r01/LNP/utilities/dwarf_therapist/Fortress /mnt/lvdata/games/linux/Dwarf Fortress LinuxLNP-0.44.12-r01/LNP/utilities/dwarf_therapist/LinuxLNP-0.44.12-r01/LNP/utilities/dwarf_therapist/launch.sh script is set correctly.

And on the console:

which: no dwarftherapist in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/mikko/opinnot/TIEP111) ERROR: not found.

Verify $_DT_BINARY defined in /mnt/lvdata/games/linux/Dwarf /mnt/lvdata/games/linux/Dwarf Fortress LinuxLNP-0.44.12-r01/LNP/utilities/dwarf_therapist/Fortress /mnt/lvdata/games/linux/Dwarf Fortress LinuxLNP-0.44.12-r01/LNP/utilities/dwarf_therapist/LinuxLNP-0.44.12-r01/LNP/utilities/dwarf_therapist/launch.sh script is set correctly.

After seeing the console log, I replaced the spaces with underscores in the file path. I can now successfully launch Dwarf Therapist from Lazy Newb Pack:

2018-Sep-22 17:33:14.104 INFO core Dwarf Therapist "40.1.2" starting normally. [src/dwarftherapist.cpp:181] (setup_logging)

carterscottm commented 5 years ago

Thank you for the report. The source of this issue lies in the launch.sh script under LNP/dwarftherapist. Adding double quotes around the $0 on line 37 will allow you to run Therapist with spaces in the path. It should look like this:


CWD=`dirname "$(readlink -f "$0")"`

I'll make sure to update this on my end for the next revision.