MTrop / DoomTools

Doom-related tools for Java. Home of DECOHack and lots of other utilities. Build WAD projects (and soon, other kinds) with ease!
https://mtrop.github.io/DoomTools/
MIT License
46 stars 5 forks source link

[WadScript] Executor in DoomTools GUI not Respecting Working Directory (Form Issue?) #87

Closed MFG38 closed 1 year ago

MFG38 commented 1 year ago

Version of DoomTools: 2023-01-14 Installation method: Full installer OS: Windows 10

Description of issue: The WadScript executor program has a fatal flaw where it tries to read the first line of the script file, which is a comment line, as actual code and thus aborts with the following error:

ERROR: Script could not be started: (C:\Users\Santtu\Documents\GitHub\coldwire\scripts\merge-respack.wscript) Line 1, Token "################################################################": Not a valid directive: ################################################################

What's interesting is that this issue is exclusive to the WadScript executor. Opening the file in the WadScript editor and running it through that does not produce this problem.

MFG38 commented 1 year ago

Ignore. I was a dumbass and trying to run the script using the wrong executor. It's WadMerge, not WadScript.

MFG38 commented 1 year ago

Actually there is still a problem. The script successfully produces an output .wad when run through the WadMerge script editor, but trying to run it through the execution dialog produces the following error:

ERROR: C:\Users\Santtu\Documents\GitHub\coldwire\scripts\merge-respack.wadm, line 10: Command mergedir returned BAD_DIRECTORY.

Just to double-check, I tried to run the script setting the working directory to every directory within the project folder, including the root folder, and it produced the same error in all cases.

MTrop commented 1 year ago

Do you have some sample code? How is line 10 of that file written?

EDIT: Actually, are you able to provide me access to your project temporarily? I think it may be private.

MFG38 commented 1 year ago

Done. The specific file that's causing the problem is this one: https://github.com/MFG38/coldwire/blob/main/scripts/merge-respack.txt

MTrop commented 1 year ago

For my notes: This is the Executor in the DoomTools Desktop. Set issue to "bug".

MTrop commented 1 year ago

So, it looks like it is respecting the working directory, but there may be an underlying form issue screwing with things. May need to investigate further, and see what other forms are affected.

MTrop commented 1 year ago

Made commit 4cf46cc74541e4561600c4a8fba180fa0dd0ccd1 in the hopes of helping this issue. Leaving this issue open until I can confirm it is fixed.

I unfortunately cannot replicate it, otherwise.

MFG38 commented 1 year ago

Issue appears to be fixed in the latest release. Cheers!

MTrop commented 1 year ago

Yay! Closing ticket.