A GUI for wmllint
Moderator: Forum Moderators
Re: A GUI for wmllint
Bugs:
- Windows 8.1 64 bit, the output box isn't scrollable via mouse scroll wheel
- Program will freeze and have to force quitted if a wmltool throws an error - the GUI run process doesn't have a fallback to main in that case
- Make the output box flush with the options so there isn't the huge bit of empty space when maximized, as shown in the screenshot. EDIT: seems only to affect the wmlindent tab, so maybe ignore this, or extend the wmlindent options down instead?
- Clear the output on each new run
- Allow an option to Cancel if you try to run without a directory selected
- By default, point the Browse dialog to the userdata directory
- Allow selection of a file instead of just a directory for the tools target
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
First of all, I can't help but notice that you screenshot looks outdated, like the original Tkinter; what version of Python are you using?
I'm asking, because I just found an incredible bug, at least in Python 2.7.7 32-bit: here, ttk is missing the xpnative and the vistanative themes, that are the ones that give it the updated look! If you want to test by yourself, type this in IDLE for 2.7.7:It should output
Instead, typing this in IDLE for 3.4.1:returns this:
Needless to say, everything worked fine in 2.7.5...
And now, your points:
At least, this strategy worked on Python 2.7.5. On 2.7.7 (again... ), it freezes for me as well. Once again, I fear that this is an upstream bug, and I advise you to fall back on 2.7.5.
But even 3.4.1 isn't immune from problems: while on 3.4.0 everything worked fine, on 3.4.1 I get a weird
I'm asking, because I just found an incredible bug, at least in Python 2.7.7 32-bit: here, ttk is missing the xpnative and the vistanative themes, that are the ones that give it the updated look! If you want to test by yourself, type this in IDLE for 2.7.7:
Code: Select all
>>> from ttk import *
>>> Style.theme_names()
('winnative', 'clam', 'alt', 'default', 'classic')
.Instead, typing this in IDLE for 3.4.1:
Code: Select all
>>> from tkinter.ttk import *
>>> Style().theme_names()
('winnative', 'clam', 'alt', 'default', 'classic', 'vista', 'xpnative')
.Needless to say, everything worked fine in 2.7.5...
And now, your points:
I just tested on Windows 7, and the scroll wheel works, if you click on the text widget first. Maybe I should force the focus on the text box after running the tools.vultraz wrote:Windows 8.1 64 bit, the output box isn't scrollable via mouse scroll wheel
It doesn't have to fallback. Using the threading module means that the GUI and the subprocess are handled in parallel. Besides, the subprocess must not touch the GUI at all, otherwise we're rewarded with some nice segfaults. That's why I'm also using a queue.vultraz wrote:Program will freeze and have to force quitted if a wmltool throws an error - the GUI run process doesn't have a fallback to main in that case
At least, this strategy worked on Python 2.7.5. On 2.7.7 (again... ), it freezes for me as well. Once again, I fear that this is an upstream bug, and I advise you to fall back on 2.7.5.
But even 3.4.1 isn't immune from problems: while on 3.4.0 everything worked fine, on 3.4.1 I get a weird
OSError: [WinError 87] Incorrect parameter
error.
That was intentional. I thought that, maybe, someone wants to run two or three tools in a row, and then generate a single output - I know that I do.vultraz wrote:Clear the output on each new run
It may be doable, but Windows XP one can choose to keep the userdata in the install location: that could be an issue.vultraz wrote:By default, point the Browse dialog to the userdata directory
The problem here is that a file selection dialog and a directory selection dialog are two different commands. I'd probably have to add a radiobutton and some callback; but if I allow file selection, allowing multiple file selection may become an even bigger problem, given that the askopenfilenames() function may return a tuple, but sometimes returns a string.vultraz wrote:Allow selection of a file instead of just a directory for the tools target
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 have both Python 2.7.7 and 3.4.0 installed, and it was running off the former when I took the screenshot. Running it on 3.x looks much better. Perhaps we should work on updating wmltools for Python 3, and drop support for 2? I tried running the 2to3 script, and it fixes some print() calls, but they still throw syntax errors when run.
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
That's not the problem. This is a bug, caused by some compilation issues, that hit the 2.7.7 version: http://bugs.python.org/issue21665.vultraz wrote:Running it on 3.x looks much better. Perhaps we should work on updating wmltools for Python 3, and drop support for 2?
Oh, I tried it as well. But there aren't only wmllint, wmlscope and wmlindent around: there are a lot more scripts written in Python, like trackplacer (that maybe should ditch PyGTK and switch to Tkinter as well, using pillow to handle JPEG images), or the whole wmltools directory. In short, this isn't a work that me or you can handle alone: to move all our scripts to Python3, we'll need every mainline Python developer available, to split the job in manageable parts.vultraz wrote:I tried running the 2to3 script, and it fixes some print() calls, but they still throw syntax errors when run.
About the scroll wheel issue: I set the script so that the focus always follow the mouse pointer. This way, you just need to hover on the text box to use the wheel (see here).
About the freezing issue: I found where the problem was, and accidentally I gave myself the solution:
I didn't realize that even showerror() counts as touching the GUI, and since the last changes in Python have made Tkinter a bit more sensible, I had to post a tuple in the queue. Then, the main thread checks the data type, and when it is a tuple the error message box appears (see here).Elvish_Hunter wrote:Besides, the subprocess must not touch the GUI at all, otherwise we're rewarded with some nice segfaults.
I haven't yet found a solution for the WinError 87 on Python 3.4.1: apparently, this error code could mean anything...
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
...but now I found it.Elvish_Hunter wrote:I haven't yet found a solution for the WinError 87 on Python 3.4.1: apparently, this error code could mean anything...
In the latest commits in master, I found and fixed the problem. It was caused by the fact that on Python 3, both the map() and filter() functions return an iterator, while on Python 2 they return a list. To fix the issue, I simply needed to cast the iterator by using the list() function.
That problem is now fixed in Python 2.7.8.Elvish_Hunter wrote:This is a bug, caused by some compilation issues, that hit the 2.7.7 version: http://bugs.python.org/issue21665.
By the way, the IntVar() instances associated with Checkbuttons are now replaced with BooleanVar() instances. Nothing changes for the user, but that was the correct thing to do from the very start - it's a pity that a lot of documentation overlooks BooleanVar(), causing mistakes like this one.
If no issue is found, I'll backport these changes to the stable series (the feature freeze doesn't apply to the maintenance tools).
Finally, I also updated the description in the wiki, mentioning the required installation of the python-tk package.
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've added an option to skip core while running wmllint in 53c2ef9cb72378f2f53e59ea082b946537b4d536. Only funny behavior is if you have this toggled on w/o a dir set so it basically does nothing, but I don't think a special case is needed for that, since the user should realize what's going on.
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
Uh... I don't think that it's a good idea . I attempted to run wmllint on what possibly is our cleanest mainline campaign (Dead Water) and excluding the core directory. This is the result:vultraz wrote:I've added an option to skip core while running wmllint
Code: Select all
/usr/bin/python2 /home/linux/wesnoth-git-dev/code/data/tools/wmllint --dryrun --nospellcheck /home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 115: Walking Corpse is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 115: Soulless is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 115: Vampire Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 115: Blood Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 115: Skeleton Archer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 115: Skeleton is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 117: no fighter units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 117: no fighter units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 117: no archer units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 117: no scout units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 117: no scout units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 117: no scout units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 108: Walking Corpse is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 108: Soulless is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 108: Vampire Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 108: Blood Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 108: Skeleton Archer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 108: Skeleton is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 110: no fighter units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 110: no fighter units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 110: no archer units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 110: no scout units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 110: no scout units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 94: Walking Corpse is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 94: Vampire Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 94: Skeleton Archer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 94: Skeleton is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 96: no fighter units recruitable at difficulty EASY.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 96: no fighter units recruitable at difficulty EASY.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 96: no archer units recruitable at difficulty EASY.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 96: no scout units recruitable at difficulty EASY.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 101: Walking Corpse is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 101: Soulless is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 101: Vampire Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 101: Skeleton Archer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 101: Skeleton is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 103: no fighter units recruitable at difficulty NORMAL.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 103: no fighter units recruitable at difficulty NORMAL.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 103: no archer units recruitable at difficulty NORMAL.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg", line 103: no scout units recruitable at difficulty NORMAL.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 105: Wolf Rider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 105: Goblin Knight is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 105: Goblin Pillager is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty NIGHTMARE.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 100: Wolf Rider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 100: Goblin Knight is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 100: Goblin Pillager is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty HARD.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 90: Wolf Rider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 90: Goblin Knight is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty EASY.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty EASY.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 95: Wolf Rider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 95: Goblin Knight is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 95: Goblin Pillager is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty NORMAL.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg", line 123: no scout units recruitable at difficulty NORMAL.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 134: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 134: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 134: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 134: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 129: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 129: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 129: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 129: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 119: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 119: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 124: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 124: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 124: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 124: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 190: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 190: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 190: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 190: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 185: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 185: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 185: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 185: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 175: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 175: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 180: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 180: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 180: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 180: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 239: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 239: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 239: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 239: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 234: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 234: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 234: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 234: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 224: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 224: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 229: Saurian Skirmisher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 229: Saurian Augur is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 229: Saurian Ambusher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/04_Slavers.cfg", line 229: Saurian Oracle is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Wolf Rider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Goblin Knight is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Goblin Pillager is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Archer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Grunt is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Crossbowman is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Assassin is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Warrior is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Slurbow is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Warlord is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg", line 113: Orcish Slayer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg", line 61: Vampire Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg", line 61: Blood Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg", line 61: Cuttle Fish is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg", line 61: Water Serpent is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg", line 61: Tentacle of the Deep is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Burner is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Clasher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Fighter is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Glider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Flare is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Thrasher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Warrior is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Arbiter is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Fire Drake is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Sky Drake is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Drake Enforcer is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 62: Inferno Drake is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Burner is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Clasher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Fighter is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Glider is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Flare is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Thrasher is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Warrior is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Drake Arbiter is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Fire Drake is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/07_Bilheld.cfg", line 59: Sky Drake is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg", line 61: Blood Bat is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg", line 61: Ghost is not a known unit type
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg", line 64: no scout units recruitable.
"/home/linux/wesnoth-git-dev/code/data/campaigns/Dead_Water/units/Citizen.cfg", line 15: Merman Citizen has unknown advancements ['Merman Fighter', 'Merman Hunter']
As two of the many Murphy's Laws state:vultraz wrote:Only funny behavior is if you have this toggled on w/o a dir set so it basically does nothing, but I don't think a special case is needed for that, since the user should realize what's going on.
In this case, however, we have something that isn't even foolproof: the funny behaviour consist in the GUI tossing out a misleading warning message and then wmllint exiting immediatly because it doesn't have anything to run on . A better behaviour will be showing an error message stating something like that: "wmllint cannot run because no directory is selected. Please disable the "Skip core directory" option or choose a directory", and then not running wmllint at all.It is impossible to make anything foolproof because fools are so ingenious.
Nothing is foolproof to a sufficiently capable fool.
As it is currently, it seems to me like this modification will do more harm than good, so unless there is a good reason to keep it, it should be reverted.
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
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. >_> I know, it should be, but there are some things that have to be updated in the script itself as well. IMO, the errors are worth it, especially for UMC authors who want to check for actual errors in their addons and understand those are irrelevant.
In hindsight changing the warning message is probably a good idea.
In hindsight changing the warning message is probably a good idea.
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
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.
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
Ah, brilliant! That way we'll have the best of both worlds. You'll have to implement it, though, since I have no idea how. I just added the Skip option by copying code you had already written
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
Done! I pushed to master three modifications:vultraz wrote:You'll have to implement it, though, since I have no idea how.
- When Skip core directory is enabled, Disable checks for unknown units is automatically checked on and disabled, so it cannot be deactivated (04f267e36b31)
- Added a better error message when Skip core directory is selected and no add-on is selected (2625c02f4d65)
- Added a Clear button, so if someone wants to run a tool only on core, it won't be mandatory to restart the GUI (b39efb97f9b5, then c65c9759d66a)
Last edited by Elvish_Hunter on January 20th, 2015, 10:53 am, edited 2 times in total.
Reason: Added a screenshot
Reason: Added a screenshot
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
Unfortunately I seem to have found another issue :/
When running wmlindent with 'Also report unchanged files' (I fixed the wording of that option in 340e02ed9b2a), I get an exit with error code 1 popup, and this in the output:
I checked, and the option is indeed passed as '-v -v', so I don't know what's wrong. Perhaps it's a wmlindent problem?
When running wmlindent with 'Also report unchanged files' (I fixed the wording of that option in 340e02ed9b2a), I get an exit with error code 1 popup, and this in the output:
Code: Select all
Traceback (most recent call last):
File "C:\Users\Charles\Documents\wesnoth-git\data\tools\wmlindent", line 287, in <module>
['help', 'dryrun', 'exclude=', 'quiet', 'verbose'])
File "C:\Python27\lib\getopt.py", line 90, in getopt
opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
File "C:\Python27\lib\getopt.py", line 190, in do_shorts
if short_has_arg(opt, shortopts):
File "C:\Python27\lib\getopt.py", line 206, in short_has_arg
raise GetoptError('option -%s not recognized' % opt, opt)
getopt.GetoptError: option - not recognized
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
Good catch! The point is that "-v -v" is passed as a string, while on Linux it must be passed as two elements of a list.vultraz wrote:I checked, and the option is indeed passed as '-v -v', so I don't know what's wrong. Perhaps it's a wmlindent problem?
I don't have time to push the fix right now (it needs a bit more testing), but I'll do it as soon as possible.
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
Except I'm on Windows 8.1, and not Linux. I dunno if that changes anything, since it seems you got more out of my comment than I knew I put into it But at least we know generally what the problem is.
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?
Re: A GUI for wmllint
Also, I just backported all our recent changes related to Skip Core to 1.12, so they'll ship out with 1.12.1.
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?