Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 19 20 [21] 22

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

jokaro

  • Escaped Lunatic
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #300 on: December 03, 2015, 01:34:18 pm »

I have implemented a small python script to fix the "unexpected operator" error without freezing PyLNP on launch.

Just download and follow the instructions here: https://github.com/jokaro/run-dwarf-fortress-script
Logged

Pidgeot

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #301 on: December 03, 2015, 03:55:02 pm »

I have implemented a small python script to fix the "unexpected operator" error without freezing PyLNP on launch.

Just download and follow the instructions here: https://github.com/jokaro/run-dwarf-fortress-script

Please note that xterm, which you're using, is not even close to being reliably available.

Apostolos

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #302 on: December 05, 2015, 04:26:42 pm »

I downloaded the new LNP but sound is greyed out at the DF starter screen and I also get nothing from Soundsense.  Am I doing something wrong?  I am pretty sure the other versions worked just fine.
Logged

jaccarmac

  • Bay Watcher
    • View Profile
    • jaccarmac.com
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #303 on: December 05, 2015, 04:32:59 pm »

Have you downloaded the sound pack for Soundsense?
Logged

Apostolos

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #304 on: December 05, 2015, 04:39:09 pm »

I ran the update inside of it.  The thing is though.. when I start the 40.23 SP2 version (I just restored it from my trash) I hear the basic music when Ifirst start it up.  I usually go to the sound and turn the main game sound all the way down to zero so all I hear is Soundsense.  In 40.24 when I first start DF, I dont hear the basic music and when I hit ESC, the Music and Sound option is greyed out.. unlike the older version.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #305 on: December 05, 2015, 04:58:51 pm »

It sounds like SOUND is set to NO in data/init/init.txt.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Apostolos

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #306 on: December 05, 2015, 05:09:01 pm »

Yup.. that was it.. Thank you.

(I never changed that myself.. did not even know about it, so it was that way from initial download and install in case anyone was interested)
Logged

Nullsrc

  • Bay Watcher
  • A Euclidean Plane Crash
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #307 on: December 06, 2015, 04:14:04 pm »

Hi all. Running Arch Linux 64-bit, and getting LNP to run has been a good deal of pain. After doing it over and over several times, I think I know how to make it work for Arch users. Note that this is probably not the most optimal way of doing it, and it's entirely possible that I forgot some libraries that may need to be installed in addition to everything else. After reading and fighting and getting all the various bits of information, I figured I could try and conglomerate it into one post. Please don't eat me if I'm doing this wrong.

The following is for the LNP for 0.40.24!

1)
The first thing to do is to enable multilib repositories. We're going to be installing the version of DF from the official repos to get the dependencies for the game. Further information can be found here, and it's advisable to read that before you continue, but you're going to uncomment the following files in /etc/pacman.conf
Code: [Select]
[multilib]
Include = /etc/pacman.d/mirrorlist
And then run
Code: [Select]
pacman -Syu to update your package list and upgrade. Now that we have multilibs enabled, it's time to install the official version of DF.
Code: [Select]
pacman -S dwarffortressCongratulations. We are now at the part where we don't rush off to play because we remember that we need to get LNP. Installing DF let us get the dependencies that we need to play the game. It would be prudent to run the installed version of DF to see if it works. If it doesn't, take more looks around and see if you can get it working before you continue.


2)
If you're reading this, chances are that you've gotten this far, but for the sake of completion, download the pack, and extract it to wherever you want to work on it. Personally, mine looks like ~/lnp/[all the actual folders], but use whatever setup works for you. Assume that we're sitting in that hypothetical ~/lnp/ folder, looking at the LNP/ and df_linux/ folders, as well as the various executables (startlnp, PyLNP, xdg-terminal).


3)
We're going to start by removing the two problematic libraries bundled with DF. To do the first, we're going to run the following commands:
Code: [Select]
cd df_linux/libs
rm libgcc_s.so.1 libstdc++.so.6
That will remove the two libraries that generate an error upon usage (If you see something about a LibGL error and some drivers, this should solve it.)


4)
Now that we've got the library mess sorted out, we need to fix that awful "not found" error. Go ahead and
Code: [Select]
cd .. back up to the df_linux/ directory. The error seems to be caused by the game being unable to find zlib, so we need to change that. To do that, copy this version of the distrofixes script and replace the original with it (make sure it still has the same name)


5)
This step (and 5.5) may or may not be necessary, a variable that seems to depend mostly on your desktop environment of choice. Try skipping this and going straight to pressing "Play Dwarf Fortress" before you do anything here. If it works, you're pretty much done. Otherwise, read on.

First, leave the df_linux/ folder, get back to our hypothetical lnp/ folder, and run LNP:
Code: [Select]
cd ..
./startlnp
By now, you should be able to actually execute the df_linux/df executable and have it work. You should even be able to modify some settings in LNP, close it, and execute the df file and play normally. However, the "Play Dwarf Fortress" button in LNP will not work. We can fix that (hopefully). In the launcher, go to File>Configure Terminal and enter "xterm" (assuming you have xterm installed). You can modify this to work with your favorite terminal, for example, using MATE's terminal requires the usage of "mate-terminal -e $" in the field. Xterm seems to be the only one that works without any usage of -e or $. You should now be able to launch DF and DFHack from the "Play Dwarf Fortress" button.
5.5) Or don't even bother
If you don't use DFHack anyway, go to the DFHack tab and disable it.


Other points of interest
  • I have not done any experimenting with utilities to get them to work. This is just for running DF from the launcher.
  • In the course of the last several days of work, I've installed several other libraries outside of what was installed by the DF package, and it is possible that some of those are necessary. Be prepared to fight around with it more.
  • I will retry these steps when the new version of the pack appears and update this post accordingly
  • If someone else can confirm that these steps work, I can look at adding this to the wiki.
« Last Edit: December 09, 2015, 07:13:51 pm by Nullsrc »
Logged

Pidgeot

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #308 on: December 06, 2015, 05:05:15 pm »

4) Making DFHack behave
First, leave the libs folder, get back to our hypothetical lnp/ folder, and run LNP:
Code: [Select]
cd ../..
./startlnp
By now, you should be able to actually execute the df_linux/df executable and have it work. You should even be able to modify some settings in LNP, close it, and execute the df file and play normally. However, the "Play Dwarf Fortress" button in LNP will not work. We can fix that (hopefully). In the launcher, go to File>Configure Terminal and enter "xterm" (assuming you have xterm installed). You can modify this to work with your favorite terminal, for example, using MATE's terminal requires the usage of "mate-terminal -e $" in the field. Xterm seems to be the only one that works without any usage of -e or $. You should now be able to launch DF and DFHack from the "Play Dwarf Fortress" button.

PyLNP is usually™©®〶 able to figure out how to do this for your desktop environment; it has a script included for that purpose. If it doesn't work for yours, please let me know what sort of setup you have; at the very least so I know there's a problem in that case. MATE specifically is one of the ones that should work though...

lethosor

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #309 on: December 06, 2015, 05:08:27 pm »

The issue is that the script doesn't work on systems where /bin/sh is dash or zsh (and it was bundled in PyLNP, although I think you said that was unintentional).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Nullsrc

  • Bay Watcher
  • A Euclidean Plane Crash
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #310 on: December 06, 2015, 05:28:14 pm »

PyLNP is usually™©®〶 able to figure out how to do this for your desktop environment; it has a script included for that purpose. If it doesn't work for yours, please let me know what sort of setup you have; at the very least so I know there's a problem in that case. MATE specifically is one of the ones that should work though...

Using openbox and zsh; I would imagine that it's the real root of the matter. Does the script have a specification for Openbox?
Logged

Nullsrc

  • Bay Watcher
  • A Euclidean Plane Crash
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #311 on: December 06, 2015, 05:37:03 pm »

Edit: Whoops, double post.  :-[
Logged

Pidgeot

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #312 on: December 06, 2015, 05:53:57 pm »

The issue is that the script doesn't work on systems where /bin/sh is dash or zsh (and it was bundled in PyLNP, although I think you said that was unintentional).

Correct, the bundling is unintentional.

At least for 0.11, I will see if I can't at least fix the dash/zsh issues, because it's a bit overdue at this point. I also have some changes planned which will hopefully make the whole thing a lot more pleasant overall (but that might take a bit longer).

Using openbox and zsh; I would imagine that it's the real root of the matter. Does the script have a specification for Openbox?

It does not, no. If you can tell me a) how to detect that Openbox is running and b) how to start a terminal, I might be able to add support (once I can get back to looking at the script, that is).

Nullsrc

  • Bay Watcher
  • A Euclidean Plane Crash
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #313 on: December 06, 2015, 06:02:28 pm »

Unfortunately, I'm not familiar with shell scripting and couldn't tell you. The problem introduced by Openbox is that it doesn't really have a default terminal emulator, so whatever is put in the script is, at best, an educated guess at what a user might have.  :-\

On a somewhat unrelated note, it is possible that my process causes major keybinding failure (probably that libgraphics.so file from 0.42.02...) I'm investigating.

"Welcome to Arch Linux. Imagine having to play DF with your OS."

Edit: Yeah, something in here has all of the keybindings out of whack. I've tried the libgraphics bundled with 0.40.24 (fails with standard "not found [...].png), so I'm at a bit of a loss. Guess I could try that old "preload libz" hack...

Edit2: Seems like the 0.40.24 version of libgraphics.so plus the 64-bit distrofixes.sh script from earlier in the topic works. Going to double-check and then edit my guide with the new changes.
« Last Edit: December 06, 2015, 06:37:32 pm by Nullsrc »
Logged

Pidgeot

  • Bay Watcher
    • View Profile
Re: Lazy Newb Pack Linux V0.40.24 with Dwarf Therapist/DFhack
« Reply #314 on: December 06, 2015, 08:08:25 pm »

Unfortunately, I'm not familiar with shell scripting and couldn't tell you. The problem introduced by Openbox is that it doesn't really have a default terminal emulator, so whatever is put in the script is, at best, an educated guess at what a user might have.  :-\

Well, if even the *concept* of a default terminal doesn't exist, then there isn't a whole lot I can do within the current framework - without some sort of "openbox-terminal" call or something, it's a bit beyond the scope of xdg-terminal.

I'll keep a mental note of this sort of thing for those larger changes I have planned, though.
Pages: 1 ... 19 20 [21] 22