A GUI for wmllint
Moderator: Forum Moderators
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
I just pushed to master two more changes:
Now it looks like this:
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
- Tom_Of_Wesnoth
- Posts: 208
- Joined: January 14th, 2015, 4:03 pm
- Location: Wesnoth 2020 and Wesnoth 2007
Re: A GUI for wmllint
That's looking good, very understandable and simple.
If presented with the opportunity, I would take great pleasure in becoming a world ruler.
Re: A GUI for wmllint
I've discovered yet another issue.
If the user has a core/ based path selected and runs wmllint, the tool will run over core twice, producing double output. Probably the best way to solve this would be extending the core append conditional to say, if not skip core and if not user path in WESNOTH_CORE_PATH or something like that.
If the user has a core/ based path selected and runs wmllint, the tool will run over core twice, producing double output. Probably the best way to solve this would be extending the core append conditional to say, if not skip core and if not user path in WESNOTH_CORE_PATH or something like that.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
Rather than the core append conditional, instead I'd check if the add-on path is different from WESNOTH_CORE_DIR. Then again, I'll have to add a special case when someone excludes the core directory, and then adds it by using the directory selection dialog.vultraz wrote:If the user has a core/ based path selected and runs wmllint, the tool will run over core twice, producing double output. Probably the best way to solve this would be extending the core append conditional to say, if not skip core and if not user path in WESNOTH_CORE_PATH or something like that.
Anyway, good catch! I'll fix it as soon as I find a good solution.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
If I have a UMC which uses just my own units (defined in this UMC), I guess I still want to have the check for unknown units. So please don't disable the option totally – just having it off by default should be enough.Elvish_Hunter wrote:IDEA! We can attach a callback function to the Skip core directory checkbutton, so when someone wants to use it, the Disable checks for unknown units checkbutton will be automatically checked and disabled (greyed out); on unchecking Skip core directory, the Disable checks for unknown units will be unchecked and will become active again. So, we'll keep the option AND avoid the nasty error messages. What do you think of it?vultraz wrote:The reason I added it was primarily for UMC users who want to run it without waiting for the 10 - 15 second delay it takes for it to parse core. Plus, core is NOT wmllint clean, resulting in annoying changes every time you run it.
Re: A GUI for wmllint
Just to clarify so that people don’t get the wrong idea, core is supposed to be always clean, especially before releasing. If it’s not, then it’s a bug. There are several known issues in master, but to my knowledge — and I know because I ran wmllint before releasing — 1.12 is completely clean.vultraz wrote:Plus, core is NOT wmllint clean, resulting in annoying changes every time you run it.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
The point is that almost all UMCs (not every UMC, I'm aware of that ) rely on core units, and if our unwary UMC author decides to skip the core directory to spare time, he will be submerged by error messages, like I demonstrated with my run on Dead Water. You can still perform the checks for unknown units, but then you'll have to include the core directory (that is the default).pauxlo wrote:Elvish_Hunter wrote:If I have a UMC which uses just my own units (defined in this UMC), I guess I still want to have the check for unknown units. So please don't disable the option totally – just having it off by default should be enough.
Sometimes, when developing a software, one must make choices: in that case, it's a choice to make easier handling the (by far) most common case.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
I do have one addon that is playable without any core units. So the question is whether the potential time difference is worth having. iirc core has only few hundred units. However I have never used wmllint for anything other than independent folder/file checking (meaning not in wesnoth file tree) so it doesnt even matter for me.
As of this gui I'm using latest version I could find, that is from last october.
As of this gui I'm using latest version I could find, that is from last october.
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
The time spared is about fifteen seconds - however, it depends on your computer.Ravana wrote:So the question is whether the potential time difference is worth having.
That's one of the other choices that I had to made: I could have easily implemented a radiobutton allowing the user choosing to check a single directory or multiple files, but there's only so much stuff that one can put in a 800 x 480 window - the minimum resolution that the game uses. I had to choose allowing to select only directories, because usually a UMC developer wants to check his whole add-on in one go, not file by file.Ravana wrote:However I have never used wmllint for anything other than independent folder/file checking
The above changes were added in version 1.12.1, so you can try them by downloading the latest Wesnoth version.Ravana wrote:As of this gui I'm using latest version I could find, that is from last october.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
I don't recall GUI.pyw using that resolution anywhere - and if it does, why does it need to? The wmltools gui is independent of the game.Elvish_Hunter wrote: there's only so much stuff that one can put in a 800 x 480 window - the minimum resolution that the game uses
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
It does, in this block near the end of the file:vultraz wrote:I don't recall GUI.pyw using that resolution anywhere
Code: Select all
ROOT_W,ROOT_H=800,480
root.geometry("{0}x{1}+{2}+{3}".format(ROOT_W,
ROOT_H,
int((root.winfo_screenwidth()-ROOT_W)/2),
int((root.winfo_screenheight()-ROOT_H)/2)))
It's to ensure that any system capable to run Wesnoth - like early netbooks, that had exactly this resolution - is able to run this GUI.vultraz wrote:and if it does, why does it need to? The wmltools gui is independent of the game.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
I can understand people playing with tiny screens, but does anyone deal with wml with that small screen?
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
Who knows? It's technically possible: a text editor doesn't require a big screen to work. Sure, if one day we'll decide to bump the minimum resolution of the game to, say, 1024 x 768, then I'll go and bump the minimum resolution of this GUI as well.Ravana wrote:but does anyone deal with wml with that small screen?
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
I just pushed to master some new updates:
- 57d2ece3deb7: until now, Windows users, when selecting a directory, had to see the Unix directory separator (slash), instead of their sual backwards slash. So I used os.path.normpath to fix this.
- 3f3e0ce5f6fc: fixed the bug reported by vultraz. I still need to decide what to do when a user selects Skip core directory, and then selects again said core directory through teh add-ons selection box.
- 63cac8ec70d4: until now, the Ctrl+A combination to select the whole text of a widget didn't work. I finally managed to fix this, but not without issues: first of all, the <<SelectAll>> event isn't fired correctly if the widget is disabled or readonly (so I had to find another way to make it working), and second the selection events didn't work at all with KeyPress events, but only with KeyRelease events.
- b337e13070ec: when reading the content of a Text widget, tkinter has the habit of adding a newline at the end of its content, so I had to remove said newline.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
Ok, another weird bug found: if you double click a folder in the file browser, it doesn't expand; it only does if you click the little arrow. Double clicking just results in a 'waiting' cursor.
I'm not sure this is a gui.pyw bug, though. Sounds like a problem with the widget library or something else.
EDIT: possible second issue. I installed python 2.7.9 32 bit, and gui.pyw wouldn't start. It worked when I installed 64 bit, though. Can you confirm?
I'm not sure this is a gui.pyw bug, though. Sounds like a problem with the widget library or something else.
EDIT: possible second issue. I installed python 2.7.9 32 bit, and gui.pyw wouldn't start. It worked when I installed 64 bit, though. Can you confirm?
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?