#124 [PATCH] NaturalDocs in Windows does not work outside of dir

open
nobody
None
5
2012-09-14
2011-07-29
Darkish
No

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.

Discussion

  • Darkish

    Darkish - 2011-07-29

    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.

     
  • Darkish

    Darkish - 2011-07-29

    Corrected (and properly tested) patch

     
    Attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks