Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 12 13 [14] 15 16 ... 39

Author Topic: PyLNP 0.14e-pre1 - Cross-platform launcher with graphics pack patching  (Read 325978 times)

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.7.1 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #195 on: November 11, 2014, 06:08:04 am »

Hi all - quick question on the folder structure.

I'm working on the mods tab, for which I created a reduced raw folder format - just remove any files identical to vanilla, typically saving 80% to 95% of the disk space.  Of course, you then need a copy of the vanilla raws to rebuild it - so I'm looking at using the "df_40_xx_win.zip"* file directly from Bay12 games.  This means that if raws or settings from an older version are wanted (eg to rebuild a mod for an old version), it's trivial to download them as the need arises. 

The question:  where should these zips go?  Bear in mind that we don't want to clutter the graphics or mods folders, and it would be significantly faster if we can leave the unzipped folders in place.  I'm thinking a new folder would be appropriate:  LNP/Baselines/ - but I'm open to suggestions for a different name or system.

Sounds good to me. The only thing that springs to mind is that legacy builds of DF have some differences in init.txt, so we might need to be able to store both of those side-by-side; diff is in the spoiler below. (data/init/interface.txt also has a completely different format, but mods shouldn't mess with keybinds anyway, so that one probably isn't a problem.)

PyLNP should already be able to detect all the information we need to obtain the URL for a given version (with a small bit of coding to transform the version number). SDL/Windows is available from 0.31.13; legacy builds have a suffix starting with 0.31.04 and no suffix before then. It might be a good idea to try the small/no music version first, in case it exists (optionally with an explicit exception for versions known to not have a small version, meaning 0.31.01, 0.31.04, and anything 0.21.102.19a or earlier), since we should not need the extra files from the "full" version.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: PyLNP 0.7.1 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #196 on: November 11, 2014, 07:14:30 am »

Sounds good to me. The only thing that springs to mind is that legacy builds of DF have some differences in init.txt, so we might need to be able to store both of those side-by-side; diff is in the spoiler below. (data/init/interface.txt also has a completely different format, but mods shouldn't mess with keybinds anyway, so that one probably isn't a problem.)

PyLNP should already be able to detect all the information we need to obtain the URL for a given version (with a small bit of coding to transform the version number). SDL/Windows is available from 0.31.13; legacy builds have a suffix starting with 0.31.04 and no suffix before then. It might be a good idea to try the small/no music version first, in case it exists (optionally with an explicit exception for versions known to not have a small version, meaning 0.31.01, 0.31.04, and anything 0.21.102.19a or earlier), since we should not need the extra files from the "full" version.

So far the use for it I've found is to act as a base for rebuilding reduced graphics packs and mods - so as long as it's consistent within an install and compatible with the DF executable, it's all good.  I hadn't anticipated how much of a pain it could be to support old versions and DF variants, but I think it's still practical.  (also my 'fetch the files' code so far just unzips the file if present...)

I've also been thinking that this vanilla-graphics baseline would let us create a folder 'LNP/Tilesets/' to allow old-school tilesets without duplicating too many files.  More on that here.

The good news though is I've finished my mods-tab version refactor for tonight, and it all works again with graphics packs and mods reduced by the same functions (in core/raws.py).  Bad news: it's going to need some more tweaking to get all the flow clear, because I tried to keep the changes to a few files so there's some duplication and redirection; on the other hand I tried to improve the style and documentation.  See here for that.

I've gone off the idea of a manifest for each mod lately - basically I don't think it adds enough value to justify departing from the content-driven simplicity of, eg, everything else bar utilities.  That means that I'll spend the next few weeks working on making mods and graphics compatible in all the merge logic, and then I think my fork will be ready to merge back into the main repo (for many fixes)  :D
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.7.1 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #197 on: November 11, 2014, 07:52:16 am »

I've gone off the idea of a manifest for each mod lately - basically I don't think it adds enough value to justify departing from the content-driven simplicity of, eg, everything else bar utilities.  That means that I'll spend the next few weeks working on making mods and graphics compatible in all the merge logic, and then I think my fork will be ready to merge back into the main repo (for many fixes)  :D

Manifests are still content, you know - just a different kind of content :P

I think it's fine to not *require* a manifest if you can avoid it, but if we get into a situation where e.g. one mod depends on another mod, that would probably be the most straightforward way to specify it (assuming some reasonable default for anything not specified in a manifest, of course).
« Last Edit: November 11, 2014, 07:58:44 am by Pidgeot »
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: PyLNP 0.7.1 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #198 on: November 11, 2014, 06:18:39 pm »

Manifests are still content, you know - just a different kind of content :P

I think it's fine to not *require* a manifest if you can avoid it, but if we get into a situation where e.g. one mod depends on another mod, that would probably be the most straightforward way to specify it (assuming some reasonable default for anything not specified in a manifest, of course).

Let me put it this way:  I'll be content with making sure the manifest-less behaviour is good, and we can worry about other details (like the manifest) after all the basic functionality is merged, released, and tested. 

I'm planning to tweak the merge system to allow overlapping merges, so dependencies can just be "do it in this order" or if that's not enough distribute the whole thing as a single mod.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.8 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #199 on: November 17, 2014, 06:33:09 pm »

PyLNP 0.8 is finally ready for download. The main features added is a new UI to customize graphics packs by changing the primary tilesets (FONT and GRAPHICS_FONT).

Note to Linux users
Due to an incompatibility with certain versions of Python 2.7 and GNU readline, I have decided to make new build VMs based on Gentoo, to ensure minimal delay for any further updates required. This has resulted in a slight change to the system requirements for the pre-compiled releases: the x86 build now requires GLIBC 2.4 (up from GLIBC 2.3). Since this version is many years old by now, it is very likely that this will not be a problem in practice, but there you go. (x64 used to require GLIBC 2.15; it's now down to 2.14.) The executable size has also grown slightly due to more features being compiled into Python.

I believe everything to still be working properly, but if new issues seem to show up, this could be the reason, so keep that in mind. Running from source is still possible on affected systems; only the pre-compiled versions are affected.

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #200 on: November 19, 2014, 06:49:28 am »

0.8 was bugged for graphics pack installations; that binary has been pulled and replaced with 0.8a, which fixes it.

Beautato

  • Bay Watcher
    • View Profile
    • Lazy Newb Pack Linux
Re: PyLNP 0.8 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #201 on: November 20, 2014, 03:32:12 pm »

PyLNP 0.8 is finally ready for download. The main features added is a new UI to customize graphics packs by changing the primary tilesets (FONT and GRAPHICS_FONT).

Note to Linux users
Due to an incompatibility with certain versions of Python 2.7 and GNU readline, I have decided to make new build VMs based on Gentoo, to ensure minimal delay for any further updates required. This has resulted in a slight change to the system requirements for the pre-compiled releases: the x86 build now requires GLIBC 2.4 (up from GLIBC 2.3). Since this version is many years old by now, it is very likely that this will not be a problem in practice, but there you go. (x64 used to require GLIBC 2.15; it's now down to 2.14.) The executable size has also grown slightly due to more features being compiled into Python.

I believe everything to still be working properly, but if new issues seem to show up, this could be the reason, so keep that in mind. Running from source is still possible on affected systems; only the pre-compiled versions are affected.

I am pretty sure the glibc 2.x is in the build-essentials by default for debianlike users. I will include that in the requirements section. It seems to work on Ubuntu 14.04 fine and a fresh install of debian 7.7 (Wheezy). Thanks for keeping linux users in mind :D and keep up the great work! :D

Beautato

  • Bay Watcher
    • View Profile
    • Lazy Newb Pack Linux
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #202 on: November 20, 2014, 03:58:13 pm »

I spoke too soon :P

With the DFhack version installed I am getting a weird error for ubuntu 14.04, with the 0.8a x64 version.
The error reads:

Code: [Select]
"There was an error creating the child process for this terminal
Failed to execute child process "/home/myusername/dflnp" (Permission denied)" with DFhack.

when I output cat stderr.txt
Code: [Select]
Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/core.lnp", line 77, in __init__
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/tkgui.tkgui", line 188, in start
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/Tkinter", line 1070, in mainloop
KeyboardInterrupt


DFhack does work when used independently of LNP and also works with the older version of 0.71 of PyLNP fine. Its just the latest version (0.8a) after I installed DFhack, I am not sure if this is related to the post above.

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.8 - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #203 on: November 20, 2014, 03:59:41 pm »

PyLNP 0.8 is finally ready for download. The main features added is a new UI to customize graphics packs by changing the primary tilesets (FONT and GRAPHICS_FONT).

Note to Linux users
Due to an incompatibility with certain versions of Python 2.7 and GNU readline, I have decided to make new build VMs based on Gentoo, to ensure minimal delay for any further updates required. This has resulted in a slight change to the system requirements for the pre-compiled releases: the x86 build now requires GLIBC 2.4 (up from GLIBC 2.3). Since this version is many years old by now, it is very likely that this will not be a problem in practice, but there you go. (x64 used to require GLIBC 2.15; it's now down to 2.14.) The executable size has also grown slightly due to more features being compiled into Python.

I believe everything to still be working properly, but if new issues seem to show up, this could be the reason, so keep that in mind. Running from source is still possible on affected systems; only the pre-compiled versions are affected.

I am pretty sure the glibc 2.x is in the build-essentials by default for debianlike users. I will include that in the requirements section. It seems to work on Ubuntu 14.04 fine and a fresh install of debian 7.7 (Wheezy). Thanks for keeping linux users in mind :D and keep up the great work! :D

DF itself requires glibc 2.3.4, IIRC; I'm only mentioning it because PyLNP used to have the same requirements on 32-bit (but now needs 2.4).

Any system from within the past 5 years should be well past that requirement; I'm just mentioning it for good measure.

I spoke too soon :P

With the DFhack version installed I am getting a weird error for ubuntu 14.04, with the 0.8a x64 version.
The error reads:

Code: [Select]
"There was an error creating the child process for this terminal
Failed to execute child process "/home/myusername/dflnp" (Permission denied)" with DFhack.

when I output cat stderr.txt
Code: [Select]
Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/core.lnp", line 77, in __init__
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/tkgui.tkgui", line 188, in start
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/Tkinter", line 1070, in mainloop
KeyboardInterrupt


DFhack does work when used independently of LNP and also works with the older version of 0.71 of PyLNP fine. Its just the latest version, I am not sure if this is related to the post above.



There's absolutely no reference to a file named "dflnp" anywhere in the source code. I don't know where that name comes from.

lethosor

  • Bay Watcher
    • View Profile
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #204 on: November 20, 2014, 04:01:18 pm »

By the way, you can now disable the DFHack console by setting the DFHACK_DISABLE_CONSOLE environment variable, which could serve as a fallback for xdg-terminal. (Most commands will work through the command-prompt plugin, while some that require a cursor will still work with dfhack-run.)
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.

Beautato

  • Bay Watcher
    • View Profile
    • Lazy Newb Pack Linux
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #205 on: November 20, 2014, 04:07:56 pm »

sorry, dflnp was the directory I was working out of.

Here is a screenshot of what happens:



It works fine when i disable dfhack, and this version of dfhack and DF works with the 0.71 versions of PyLNP.

By the way, you can now disable the DFHack console by setting the DFHACK_DISABLE_CONSOLE environment variable, which could serve as a fallback for xdg-terminal. (Most commands will work through the command-prompt plugin, while some that require a cursor will still work with dfhack-run.)

this also works

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #206 on: November 20, 2014, 04:52:38 pm »

I have no idea why that would suddenly happen.

Can you please try to open xdg-terminal and add

Code: [Select]
echo DE is $DE
echo COMMAND is $command

after "detectDE", near the end? It won't *fix* the problem, but it should help me figure out what's happening. You may need to start PyLNP from a terminal to see the output.

It would also be helpful if you could check whether or not running from source works.

EDIT: I am in the process of building and uploading 0.8b to fix some minor issues.

Beautato, I don't *think* the issues fixed in 0.8b are causing your current problem, but you'll probably want to switch to it anyway.
« Last Edit: November 20, 2014, 05:07:55 pm by Pidgeot »
Logged

Beautato

  • Bay Watcher
    • View Profile
    • Lazy Newb Pack Linux
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #207 on: November 20, 2014, 05:39:38 pm »

I have no idea why that would suddenly happen.

Can you please try to open xdg-terminal and add

Code: [Select]
echo DE is $DE
echo COMMAND is $command

after "detectDE", near the end? It won't *fix* the problem, but it should help me figure out what's happening. You may need to start PyLNP from a terminal to see the output.

It would also be helpful if you could check whether or not running from source works.

EDIT: I am in the process of building and uploading 0.8b to fix some minor issues.

Beautato, I don't *think* the issues fixed in 0.8b are causing your current problem, but you'll probably want to switch to it anyway.

Sorry for not getting back to you earlier, updating the package. But 0.8b works fine now, and the error is not longer there. :D :D you are amazing Pidgeot, do you know what the problem was?

Update:  0.8bPyLNP Works with both DFhack gcc4.5.4 and 4.9.1 and with regular DF fine. Everything is good/working now. Not sure what the problem with 0.8a was however it still did/does not work. I ended up getting the error:
Code: [Select]
/tmp/_MEIdzmG81/xdg-terminal: 364: [: x/home/masami/Projects/Lazy-Newb-Pack-Linux/pack/df_linux/dfhack: unexpected operator
/tmp/_MEIdzmG81/xdg-terminal: 367: [: x-x: unexpected operator
nohup: redirecting stderr to stdout
when doing the same thing from source.  Again 0.8b works fine now.


« Last Edit: November 20, 2014, 05:51:31 pm by Beautato »
Logged

Pidgeot

  • Bay Watcher
    • View Profile
Re: PyLNP 0.8a - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #208 on: November 20, 2014, 05:46:23 pm »

I have no idea why that would suddenly happen.

Can you please try to open xdg-terminal and add

Code: [Select]
echo DE is $DE
echo COMMAND is $command

after "detectDE", near the end? It won't *fix* the problem, but it should help me figure out what's happening. You may need to start PyLNP from a terminal to see the output.

It would also be helpful if you could check whether or not running from source works.

EDIT: I am in the process of building and uploading 0.8b to fix some minor issues.

Beautato, I don't *think* the issues fixed in 0.8b are causing your current problem, but you'll probably want to switch to it anyway.

Sorry for not getting back to you earlier, updating the package. But 0.8b works fine now, and the error is not longer there. :D :D you are amazing Pidgeot, do you know what the problem was?

If 0.8b fixed it? ...I have a guess, but I'm not 100% certain.

After 0.7.1, I merged in a pull request that refactored some of the launching code. This included trying some script versions that the Linux system itself could provide.

This code was part of the 0.8a build, but after it proved to cause problems with running from source, I removed that bit again - that change is then in 0.8b. I am therefore guessing that your system tried to use one of those scripts, and it didn't work properly.

I can't be sure, but it's the best guess I have, given that it worked for you with 0.7.1. There weren't really any other changes between the two versions that touched that area of the code.
« Last Edit: November 20, 2014, 05:48:54 pm by Pidgeot »
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: PyLNP 0.8b - Cross-platform Lazy Newb Pack port with graphics pack patching
« Reply #209 on: December 12, 2014, 06:57:50 am »

Just saw this:

This tiny util in HTML5 compliant standard code should be integrated in every DF frontend launcher out there, especially Starter Pack and variants.  Why? because if you combine this with TWBT overrides you have almost unlimited DF tilesets that can use every local font installed and the online chrome free font repo as a base... Awesome.

Text tilesets for TwbT do not have to contain any special hand-drawn symbols, so it should be possible to use just any font as is. But I couldn't find any tool to generate tilesets from fonts, so here it is. Can also be used as a starting point for creating customised ASCII tilesets.

http://www.mifki.com/df/fontgen.html

Works best and fonts look best in Chrome. In the font name field you can specify any font available locally or any font from Google Fonts collection (of course monospaced fonts are better). Font weight is a CSS font weight.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.
Pages: 1 ... 12 13 [14] 15 16 ... 39