blu3mania / npp-papyrus

Notepad++ plugin to provide Papyrus scripting language support to Notepad++, such as syntax highlighting with automatic recognition of class names/functions/properties, keywords matching, and hyperlinks to referenced scripts. It also comes with a compiler that can provide compilation errors in a separate list window, as well as inline annotation and indication where errors are reported, plus support anonymization of compiled .pex files.
GNU General Public License v3.0
24 stars 7 forks source link

Compiler failing due to spaces in the path (it seems) #18

Closed avoitishin closed 2 years ago

avoitishin commented 2 years ago

image image

Tried putting path in quotes, escaping the spaces but got the same result. Not sure what I am doing wrong

blu3mania commented 2 years ago

@avoitishin No, space is not the issue as the code automatically adds double quotes around the paths. The problem is actually that with the trailing blckslash for input/out directory in your settings, the command line will become "E:\Games\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe" YourSource.psc -i="E:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts\Source\" -o="E:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts\" -f=TESV_Papyrus_Flags.flg -op

You see that \" in the command at the end of "-i" and "-o" param? Almost all command line programs should be able to correctly handle it and realize it is a trailing backslash, but for some reason PapyrusCompiler.exe treats it as an escape of double quote, and thus you see the double quote at the end of "-i" part in the error message you showed above, instead of backslash. I have no idea why Bethesda implemented their tool this way but it's out of my control.

To make it work, you have 2 options. One is to remove the trailing backslash in both input and output directory settings. The other is to actually make it double backslash, e.g. E:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts\Source\\

avoitishin commented 2 years ago

Ah! This helped. Thank you

blu3mania commented 2 years ago

You are welcome!