Old 17th December 2004, 15:50   #1
Josh Yelon
Junior Member
 
Join Date: Dec 2004
Posts: 2
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?
Josh Yelon is offline   Reply With Quote
Old 17th December 2004, 15:53   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
That happens due to a bug fix in 2.03. From the release notes:
Quote:
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:
Quote:
Made File's /r switch always search in subdirectories, even if the given path points to an existing directory
Use this instead:
code:
SetOutPath $INSTDIR\lib
File /r d:\project\built\lib\*


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th December 2004, 16:04   #3
Josh Yelon
Junior Member
 
Join Date: Dec 2004
Posts: 2
hm.

You guys really ought to document that behavior in the "File" section of the manual. I mean, it really is weird.
Josh Yelon is offline   Reply With Quote
Old 17th December 2004, 16:28   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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:
code:
File src\*.xml
File src\plugins\*.xml
File src\doc\*.xml

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

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


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump