Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Algee

Pages: [1]
1
Ok, i've released version 1.1b. It has a few new features and it works fine with the old (python 2.7.5) and new (2.7.10) LNP package.

I've also hacked together a method to locate gamelog.txt when it's opened for the first time from a LNP utility folder.

Spoiler: Changelog (click to show/hide)

2
I packaged the exe using pyinstaller instead of py2exe and it fixed the issue with the 0.10b pyLNP package. As a bonus everything is neatly packed into a few files. I've heard that the new LNP release by PeridexisErrant already fixed the issue, even when you bypass the .bat script. I assume it uses the 2.7.10 build Pidgeot posted here, along with TheBloke's .bat?

Anyway, i'll probably test it out a bit more to make sure there's no new issues then upload a new release to github later today.

3
PTW - this is already great, and it looks like ongoing development will be more reliable than it's predecessors.

I tried adding my utility to the utility folder (the .exe i've compiled with py2exe), and I get the following error when I try and open it through the LNP.

Weird.  I also get an error, and launching it from a .bat script works... except through PyLNP.

I tried compiling through Nuitka with --standalone (which produces real native executables), but got a bunch of Py3 import errors.  Can you see if the output of "pip install nuitka && nuitka run.py --standalone" has the same problem?

I am away from my computer for the week so I can't test these things out. If you can get a compiled exe working I would go with that for the time being.

A far as I remember I installed a 32 bit version of python 2.7.10 that I use to compile the exe, but I can give pyinstaller a try when I get back. It would be nice to get everything bundled into a single exe like pyLNP, which I don't think py2exe can do.

4
DF General Discussion / Re: Dwarf Fortress 40_24 Starter Pack r16
« on: October 31, 2015, 05:40:16 pm »
I tried adding my utility to the utility folder (the .exe i've compiled with py2exe), and I get the following error when I try and open it through the LNP.

Code: [Select]
Traceback (most recent call last):
  File "run.pyc", line 4, in <module>
  File "Window.pyo", line 161, in __init__
   
  File "Tkinter.pyo", line 1814, in __init__
   
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    {C:\Users\Algee\AppData\Local\Temp\_MEI39202\_MEI\tcl} C:/Users/Algee/AppData/Local/Temp/_MEI39202/_MEI/tcl8.5 D:/!!FUN!~1/LNP/Utilities/lib/tcl8.5 D:/!!FUN!~1/LNP/Utilities/lib/tcl8.5 D:/!!FUN!~1/LNP/lib/tcl8.5 D:/!!FUN!~1/LNP/Utilities/library D:/!!FUN!~1/LNP/library D:/!!FUN!~1/LNP/tcl8.5.15/library D:/!!FUN!~1/tcl8.5.15/library

C:/Users/Algee/AppData/Local/Temp/_MEI39202/_MEI/tcl/init.tcl: version conflict for package "Tcl": have 8.5.15, need exactly 8.5.2
version conflict for package "Tcl": have 8.5.15, need exactly 8.5.2
    while executing
"package require -exact Tcl 8.5.2"
    (file "C:/Users/Algee/AppData/Local/Temp/_MEI39202/_MEI/tcl/init.tcl" line 20)
    invoked from within
"source C:/Users/Algee/AppData/Local/Temp/_MEI39202/_MEI/tcl/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"


This probably means that Tcl wasn't installed properly.

I tried downloading the pyLNP source and it opens it just fine.

5
Quote from: lethosor
* Any thoughts on allowing the number of panels to be adjusted? It looks fairly simple (removing panels on the fly might be a bit harder), and the configuration format ought to be able to handle it, but I don't know if there's another obstacle.

Yes I am thinking of doing that. I've actually written most of the code with this in mind, including my data structure for the information about filter color & visibility. I think the only changes I would need to make is on the frontend along with the window specific settings in settings.cfg. Ideally I would like to have the panels be dockable, so you can put them side by side or up/down in whatever configuration you desire, but that will get pretty complicated. I don't think removing them will be much of a issue, since the program just iterates over each window and sends them the new announcements. Currently you can effectively hide one of the panes by moving the sash bar to the edge of the screen. it saves the sash position when you exit, so if you wanted to only use one window you don't have to move it every time you launch the program.   

Quote from: lethosor
* It might be nice to have a built-in editor for filters.txt, and it would pretty easy to implement (PyLNP does this, IIRC). I don't think xdg-open is available or works on all Linux distributions, at least.

Yea that would be nice, but the file is available in the program directory. If I were to build a editor, I would probably concentrate the visibility settings for each panel & the colors into a single window, so you can see the list of regular expressions along with how they are configured to display. Currently, the window that lets you configure colors is hideous, and could use a lot of work. This is my first time programming with a GUI library, so every time i add something new (like the font dialog) I have to pour over the doc's and figure out how that widget works. So I've just been making stuff functional rather than making it look pretty.

Quote from: lethosor
* Following those ideas, would you be opposed to moving the current menu options to a menu (like the "Options" menu currently present on OS X)? The current menu bar on Windows does look nice, but I feel like additional menu options would run out of space pretty quickly. (You could always add buttons for a few commonly-used options instead.)

If you are talking about a file menu kind of thing for the menu bar, that's actually the next thing I plan to work on. I initially avoided that because I only had a single option (set gamelog.txt) but I have a few ideas for stuff to add to the menu. Like duplicating the window pulldown options into sub menus on the menu bar, options to remove the border and force the window to stay on top (overridedirect), and probably move all the settings.cfg options over there. 


6
Tix should be mentioned as a dependency. What exactly is it used for, by the way?
Edit: It seems that Tix isn't available on some platforms, and the sources I checked recommend Ttk as a more up-to-date alternative (which I can confirm is available).
Edit 2: I got this to launch on OS X and fixed the menu bar (see the pull request I just made). Not sure about Linux yet.

Thanks for the help with OS X, let me know if you run into any more problems.

I removed Tix and ttk is now only needed for the font dialog. I might try and boot this up on my raspberry pi tomorrow to see how it works in debian.

7
I recently tried using the announcement filter utility that came with the Lazy Newb Pack and was constantly annoyed by its problems (Not scrolling for new announcements being the biggest). So I started writing a python program that fixed those issues, this is what I came up with.

Spoiler: Screenshot (click to show/hide)

The program will give you a live feed of your announcements and combat reports, so you don't need to pause the game to read them. It should work on any version of python above v2.3.x.

There are two windows you can configure filters for, allowing you to separate important announcements from the never ending combat reports (or the less important stuff: "Urist mcHauler cancels Store Item in Stockpile: Item inaccessible."). The filters that it matches are loaded from a text file and can be edited however you want, as long as you have a basic understanding of regular expression syntax.

You can find the project on github: https://github.com/NuAoA/AnnouncementWindow

Spoiler: Changelog (click to show/hide)


I compiled a .exe for windows that you can find on the releases page. If you are on OS X or Linux you will need python to run this program (Which should already be installed on your os). I can't test the program on those systems myself, so please let me know if you discover any bugs/crashes.

Pages: [1]