jheid
16th June 2005 11:06 UTC
Problem with File command
Hello.
I have the following directories in the source path:
bin
mysql\bin
Copy of mysql\bin
When I use
File /r "bin"
it will install all of the three directories.
I tried
File /r ".\bin"
but without success... Any idea (using 2.06)?
Regards,
JOERN
Mæster
16th June 2005 11:24 UTC
What should be installed in the destination directory?
kichik
16th June 2005 17:41 UTC
With File /r bin you're telling NSIS to include all files and folders named bin under the working directory. Use:
SetOutPath $INSTDIR\bin
File /r bin\*
jheid
16th June 2005 18:52 UTC
Originally posted by kichik
With File /r bin you're telling NSIS to include all files and folders named bin under the working directory. Use:
SetOutPath $INSTDIR\bin
File /r bin\*
Yes, that would do...
But it's very complicated...
I used
CreateDirectory "$INSTDIR\bin"
SetOutPath "$INSTDIR\bin"
File "bin\w32"
SetOutPath "$INSTDIR"
but there should be a better solution I think. Just think of an huge install directory, where many (sub-)directories of that kind exist. For that developer has to use the four lines for each directory if he's not definetly sure, there isn't another directory of that name somewhere below.
I would be nice if there's a way like
File /r ".\bin"
or
File /r "^bin" (Perl-Pattern)
I think it's a necessary enhancement...
Thanks for your answers though.
JOERN
Pidgeot
16th June 2005 19:13 UTC
You don't need to use CreateDirectory (SetOutPath automatically does that if it's needed) and you don't need to go back to $INSTDIR after each directory.
jheid
17th June 2005 09:57 UTC
Originally posted by Pidgeot
You don't need to use CreateDirectory (SetOutPath automatically does that if it's needed) and you don't need to go back to $INSTDIR after each directory.
Sure, but for me this is not the way it should be (or there has to be a notice in the documentation about it) :(.
Thanks anyway.
kichik
17th June 2005 12:21 UTC
There are two notices in the documentation about it. One in the release notes of version 2.03 and one in the documentation for File.