Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 22

Author Topic: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack  (Read 165832 times)

Beautato

  • Bay Watcher
    • View Profile
    • Lazy Newb Pack Linux
Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« on: July 20, 2014, 10:29:37 pm »

    Linux Lazy Newb Pack V0.40.24

    I have assembled a small package to get people started on linux using Pidgeot's PyLNP interface.

    Please also check out the project page here: https://github.com/Lazy-Newb-Pack/Lazy-Newb-Pack-Linux/

    Download:

    x64 Linux available on DFFD

    for i686 Linux see Github Releases Here

    Website Download [probably faster]:
    x64 Website

    i686 Website

    Similar packages also available in windows and Mac:
    Windows Version: PeridexisErrant's Starter Pack
    Mac Version: Fricy's MacNewbie Pack


    Update: 29th, Mar 2015

    R3 - updated Pidgeot's PyLNP to 0.9.5a, updated Dwarf Therapist to v31, TWBT 5.43 some bug fixes from @miffedmap and @lethosor Thank you so much bug slayers!

    R2 -  dfhack v0.40.24 r2, updated graphics, PyLNP 0.9.2a

    R1 - dfhack v0.40.24 r1, TWBT 5.42, updated graphics

    R0 - Updated DF to v0.40.24, added dfhack v0.40.24 r0, updated graphics, DTv30.1






    Included Mods
    Usage

    • Usage:  ./startlnp

    Dependencies

    Install required packages

    For Debian / Ubuntu

    [/list][/list]
    Code: [Select]
    sudo apt-get install default-jre libsdl1.2debian:i386 libsdl-image1.2:i386 libsdl-ttf2.0-0:i386 libglu1-mesa:i386 libgtk2.0-0:i386 libopenal1:i386 libjpeg62:i386 coreutils g++ gcc patch xterm sed python bzip2 qtchooser qtbase5-dev qtbase5-dev-tools qtscript5-dev qt5-qmake libqt5script5 libqt5scripttools5 libqxt-core0 libqxt-gui0

    Dwarf Therapist was compiled with qt4, see splintermind's installation instructions and make sure you have the dependancies.


    Tested On
    • Ubuntu 14.04 "Trusty Tahr" fresh install.


    Again a Huge Thanks to Tarn, Zach and Splintermind, Dricus, kiryl, PeridexisErrant, fricy and the others who work on open source!
    « Last Edit: March 29, 2015, 08:36:33 pm by Beautato »
    Logged

    Beautato

    • Bay Watcher
      • View Profile
      • Lazy Newb Pack Linux
    Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
    « Reply #1 on: July 22, 2014, 11:52:29 pm »

    updated the Dwarf therapist to v23.2 latest compile, and added Ironhand tileset and a large set of embark profiles.

    What other tilesets do people enjoy?

    lanp

    • Bay Watcher
      • View Profile
    Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
    « Reply #2 on: July 23, 2014, 08:05:29 am »

    updated the Dwarf therapist to v23.2 latest compile, and added Ironhand tileset and a large set of embark profiles.

    What other tilesets do people enjoy?

    I am huge fan of Taffer's tileset myself.

    http://www.bay12forums.com/smf/index.php?topic=107924.0
    Logged

    Mimaku

    • Bay Watcher
      • View Profile
    Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
    « Reply #3 on: July 25, 2014, 09:20:13 am »

    Thanks a lot,

    great work! I unpacked it yesterday and it worked fine...no more building from source is great! :-)

    The only issue i encountered, was that Dwarf Therapist failed to connect. It said, that i used the wrong version of DF. But most propably it was my fault, since i did not start the LNP via "sudo" nor have i checked how i configured the "ptrace_scope" on my system... i will check for it in a few hours, when i have time for this and update/edit this post.

    PS: I personaly prefer the Phoebus-Tileset...so thanks for supporting it out of the box. Ironhand is great too, but i'm so familiar with phoebus that i stick with it for now...actually i haven't tested more than these two tilesets :-D

    -- update --

    ok, as i expected, it was really my fault...i should have run it with "sudo"...ptrace_scope does not seem to be necessary anymore...so, yeehaa! :-) awesome!
    « Last Edit: July 25, 2014, 07:08:35 pm by Mimaku »
    Logged

    lex10s

    • Escaped Lunatic
      • View Profile
    Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
    « Reply #4 on: July 28, 2014, 12:08:53 am »

    A better option to avoid use root privileges is:
    Code: [Select]
    sudo setcap cap_sys_ptrace=eip /patch/to/dwarftherapist
    Logged

    Dwimenor

    • Bay Watcher
      • View Profile
    Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
    « Reply #5 on: July 28, 2014, 02:28:28 am »

    If you are getting similar error:
    Code: [Select]
    Not Found: data/art/some_file.png
    Then you need to install 32bit version of zlib and point Dwarf Fortress to it. For Arch Linux install lib32-zlib package from multilib repository, then open df_linux/df and add this line after cd "${DF_DIR}"
    Code: [Select]
    export LD_PRELOAD=/usr/lib32/libz.so
    Path to 32bit zlib probably varies between distros (that one is for Arch). Try this to find zlib on your system:
    Code: [Select]
    find /usr/lib* -name libz*
    About sudo thing: you should never run games as root. NEVER. Here's a little quickfix for startlnp:
    Code: [Select]
    #!/bin/sh
    LNP_DIR=$(dirname "$0")
    cd "${LNP_DIR}"

    #Check whether Dwarf Therapist can read from DF memory:
    dt_capabilities=$(getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
    if [ $dt_capabilities != "cap_sys_ptrace+eip" ]; then
    msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
    xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
    fi

    #run Lazy Newb Pack
    java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar
    Logged

    eccentric

    • Bay Watcher
      • View Profile
    Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
    « Reply #6 on: July 28, 2014, 08:38:38 am »

    If you are getting similar error:
    Code: [Select]
    Not Found: data/art/some_file.png
    Then you need to install 32bit version of zlib and point Dwarf Fortress to it. For Arch Linux install lib32-zlib package from multilib repository, then open df_linux/df and add this line after cd "${DF_DIR}"
    Code: [Select]
    export LD_PRELOAD=/usr/lib32/libz.so
    Path to 32bit zlib probably varies between distros (that one is for Arch). Try this to find zlib on your system:
    Code: [Select]
    find /usr/lib* -name libz*
    About sudo thing: you should never run games as root. NEVER. Here's a little quickfix for startlnp:
    Code: [Select]
    #!/bin/sh
    LNP_DIR=$(dirname "$0")
    cd "${LNP_DIR}"

    #Check whether Dwarf Therapist can read from DF memory:
    dt_capabilities=$(getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
    if [ $dt_capabilities != "cap_sys_ptrace+eip" ]; then
    msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
    xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
    fi

    #run Lazy Newb Pack
    java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar
    Thanks for the solution. To get 40.05 running yesterday I installed, dwarffortress 0.40.04-1 and copied the .so from the libs into 40.05 libs. It worked but was less than elegant...

    Arch is new for me (installed it Friday coming from Ubuntu/Mint/Debian)

    « Last Edit: July 28, 2014, 12:17:21 pm by eccentric »
    Logged

    Beautato

    • Bay Watcher
      • View Profile
      • Lazy Newb Pack Linux
    Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
    « Reply #7 on: July 28, 2014, 11:09:01 pm »

    I updated the LNP package to 40.05,
      Added graphic packs:
      • [16x16] CLA v0.40.05v1
      • [16x16] Ironhand v0.40.05v1
      • [16x16] Mayday v0.40.05v0
      • [16x16] Spacefox v0.40.05v1
      fixed DT to work with 40.05 and added some keybindings

      Download here: http://dffd.wimbli.com/file.php?id=8936

      Beautato

      • Bay Watcher
        • View Profile
        • Lazy Newb Pack Linux
      Re: Lazy Newb Pack Linux V0.40.04 with working Dwarf Therapist
      « Reply #8 on: July 29, 2014, 12:11:35 am »

      If you are getting similar error:
      Code: [Select]
      Not Found: data/art/some_file.png
      Then you need to install 32bit version of zlib and point Dwarf Fortress to it. For Arch Linux install lib32-zlib package from multilib repository, then open df_linux/df and add this line after cd "${DF_DIR}"
      Code: [Select]
      export LD_PRELOAD=/usr/lib32/libz.so
      Path to 32bit zlib probably varies between distros (that one is for Arch). Try this to find zlib on your system:
      Code: [Select]
      find /usr/lib* -name libz*
      About sudo thing: you should never run games as root. NEVER. Here's a little quickfix for startlnp:
      Code: [Select]
      #!/bin/sh
      LNP_DIR=$(dirname "$0")
      cd "${LNP_DIR}"

      #Check whether Dwarf Therapist can read from DF memory:
      dt_capabilities=$(getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
      if [ $dt_capabilities != "cap_sys_ptrace+eip" ]; then
      msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
      xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
      fi

      #run Lazy Newb Pack
      java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar

      I added your fix to this version as well, thank you a lot!! :D :D

      Dwimenor

      • Bay Watcher
        • View Profile
      Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
      « Reply #9 on: July 29, 2014, 01:47:07 am »

      Slightly improved version. I forgot that unset variables cause problems within "if" statements in shell scripts, hence assigning "0" as default value for dt_capabilities
      Code: [Select]
      #!/bin/sh
      LNP_DIR=$(dirname "$0")
      cd "${LNP_DIR}"

      #Check whether Dwarf Therapist can read from DF memory:
      dt_capabilities=$(getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
      dt_capabilities=${dt_capabilities:=0}
      if [ ${dt_capabilities} != "cap_sys_ptrace+eip" ]; then
      msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
      xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
      fi

      #run Lazy Newb Pack
      java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar
      « Last Edit: July 29, 2014, 08:37:42 am by Dwimenor »
      Logged

      fuzzylunkinz

      • Escaped Lunatic
        • View Profile
      Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
      « Reply #10 on: July 29, 2014, 02:36:43 am »

      I had to use the following, using the full path to /sbin/getcap since /sbin isn't on my $PATH:

      Code: [Select]
      #!/bin/sh
      LNP_DIR=$(dirname "$0")
      cd "${LNP_DIR}"

      #Check whether Dwarf Therapist can read from DF memory:
      dt_capabilities=$(/sbin/getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
      dt_capabilities=${dt_capabilities:=0}
      if [ ${dt_capabilities} != "cap_sys_ptrace+eip" ]; then
              msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
              xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
      fi

      #run Lazy Newb Pack
      java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar
      Logged

      Mimaku

      • Bay Watcher
        • View Profile
      Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
      « Reply #11 on: July 29, 2014, 05:33:27 am »

      Quote
      About sudo thing: you should never run games as root. NEVER. Here's a little quickfix for startlnp:

      You are absolutely right about this...thanks for the hint! Now i realize, why it made me so curious about this ptrace vs. sudo thing...

      @beautato:

      Thanks for implementing it directly into the start-script...i will give it a try this evening
      Logged

      Mimaku

      • Bay Watcher
        • View Profile
      Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
      « Reply #12 on: July 29, 2014, 04:22:49 pm »

      Ok, so here's what i got on Ubuntu 14.04 64Bit

      As it stands now i get an error, when starting the LNP from a fresh download...

      Code: [Select]
      ./startlnp: 7: [: !=: unexpected operator
      Fortunatly Dwimenor also posted his improved version, which worked absolutly fine for me

      Quote
      #!/bin/sh
      LNP_DIR=$(dirname "$0")
      cd "${LNP_DIR}"

      #Check whether Dwarf Therapist can read from DF memory:
      dt_capabilities=$(getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
      dt_capabilities=${dt_capabilities:=0}
      if [ ${dt_capabilities} != "cap_sys_ptrace+eip" ]; then
         msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
         xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
      fi

      #run Lazy Newb Pack
      java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar

      So actually it's asking once for sudo to setup the ptrace permenantly and that's it - which is fine and which is the behaviour i would've expected..

      If it's not to much of an effort, i would be really great if you used it for future releases of the LNP and patch the actual one...

      Apart from that i was a bit mislead by the name of folder after extracting the archive, because it was simply called "pack"...i first looked though my download-folder and was'nt able to find the new "LNP-linux-etc..." folder, as it was called before. Silly me ;-)

      Besides that the craftsdwarfship of this release is all of it's finest :-)
      Logged

      hagelund

      • Escaped Lunatic
        • View Profile
      Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
      « Reply #13 on: July 31, 2014, 01:08:24 pm »

      On a fresh download of Ubuntu 14.04 I recieved the

      Code: [Select]
      ./startlnp: 7: [: !=: unexpected operator
      error, it fixed using the fix listed by Dwimenor

      However I get an error when I try to start up Dwarf Therapist:

      Code: [Select]
      /home/hagelund/Downloads/pack/LNP/utilities/dwarf_therapist/DwarfTherapist: error while loading shared libraries: libQt5Script.so.5: cannot open shared object file: No such file or directory
      Process failed!
      org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)

      I'm not really sure what this error means, does anyone have an idea to a fix here?
      Logged

      Mimaku

      • Bay Watcher
        • View Profile
      Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
      « Reply #14 on: July 31, 2014, 04:29:53 pm »

      hello hagelund,

      i can darkly remember that i had the same issue when i tried to build Dwarf Therapist from source...about a month ago or so

      the issue in your case is a (or even more) missing library/libraries...since the new DT for 0.40.xx is made with qt5 instead of qt4, which it was for the older release of DF

      Splintermind has on his GitHub-Repo a "short" instruction, which libraries are needed to build from source, but also required to run it (if i did not understand it right, correct me please)...here's the link https://github.com/splintermind/Dwarf-Therapist/blob/master/BUILDING.txt

      before i give you a unnecessary advice to install a bunch of packages you perhaps wont need, try simply to get the missing library via

      Code: [Select]
      sudo apt-get install libqt5script5and all related dependencies...

      if it still does not work - and thats where my confidents ends - just take them all in a good guess...here the snippet from splinterminds instruction

      Quote
      For Debian-derived (Ubuntu, Mint, etc.) distributions, you can run the following command from a terminal:

      Code: [Select]
      sudo apt-get install qtchooser qtbase5-dev qtbase5-dev-tools qtscript5-dev qt5-qmake libqt5script5 libqt5scripttools5 libqxt-core0 libqxt-gui0
      I really can't remember if any sym-linking was necessary along the way...but i think it was not.

      And last thing to say, i wont be held responsible if this in any *weird way* screws up your system...;-) I did it on my ubuntu, and it worked fine
      Logged
      Pages: [1] 2 3 ... 22