[PATCH] NaturalDocs in Windows does not work outside of dir
Multi-language source code documentation tool
Brought to you by:
gregvalure
The problem is that NaturalDocs in Windows does not work if invoked outside of the folder the script resides in:
C:\Some\Random\Dir>NaturalDocs
Can't open perl script "NaturalDocs": No such file or directory
The problem is that the script tries to invoke perl via: "perl NaturalDocs %NaturalDocsParams%" - this does not search %PATH% and thus, the interpreter cannot find the file.
Solution is to change the above line into:
perl %~dp0NaturalDocs %NaturalDocsParams%
What this does is invoke the script using full path (%~dp0 gets the path the batch file resides in, including the trailing ).
Attached is the patch.
I forgot to mention that this is NaturalDocs version 1.52.
The patch was incorrect due to the "shift" command (I have overlooked that) - I will attach an updated, fixed patch.
Corrected (and properly tested) patch