Archive: Why is it packing *that* directory?


Why is it packing *that* directory?
I am having trouble with the basic "File" command. The command I am using is this:

File /r d:\project\built\lib

It proceeds to pack up the specified directory, but then it also packs up d:\project\built\python\lib. Why did it pack this latter directory? How do I get it to stop doing that and only pack the specific directory?


That happens due to a bug fix in 2.03. From the release notes:

If you're using File /r folder in your script, it's recommended you replace it with File /r folder\* for faster compilation and so no other folders named folder will be included
From the change log:
Made File's /r switch always search in subdirectories, even if the given path points to an existing directory
Use this instead:
SetOutPath $INSTDIR\lib
File /r d:\project\built\lib\*

hm.
You guys really ought to document that behavior in the "File" section of the manual. I mean, it really is weird.


Seems I forgot to document it back when it was added in 2.0b4. I will update the documentation.

The idea behind this feature is to allow easy inclusion of files in multiple directories. For example, instead of:

File src\*.xml
File src\plugins\*.xml
File src\doc\*.xml
All you have to use is:
File /r src\*.xml
You might also want to use:
Section "binary"
File /r *.exe
SectionEnd

Section "source"
File /r src # all src folders
SectionEnd