Old 6th December 2011, 19:36   #1
elwingpenny
Junior Member
 
Join Date: Dec 2011
Posts: 2
script compiles different when I add a folder

Hello all,

I am trying to create an exe file from an nsi script. But the script changes its behaviour if I put a folder named "aley" with the same directory as the nsi script. If I put "aley" it descends to a folder in aley and if I remove the folder it compiles perfectly.

My part of the nsi script is this:
SetOutPath "$INSTDIR\etc"
File /r etc\config
SetOutPath "$INSTDIR"
File /r plugins

If I put "aley" folder to the same directory with the nsi scripts, the log shows this:

File: Descending to: "etc\config\nagios\"
File: "commands.cfg" 3783 bytes
File: "contacts.cfg" 2221 bytes
File: "hostgroups.cfg" 136 bytes
File: "localhost.cfg" 7292 bytes
File: "templates.cfg" 11293 bytes
File: "timeperiods.cfg" 3209 bytes
File: Returning to: "etc"
SetOutPath: "$INSTDIR"
File: Descending to: ".\aley\perl5\5.10\CPANPLUS\Shell\Default\Plugins\"
File: "CustomSource.pm" 5960 bytes
File: "HOWTO.pod" 3890 bytes
File: "Remote.pm" 4738 bytes
File: "Source.pm" 2619 bytes
File: Descending to: ".\aley\perl5\vendor_perl\5.10\Data\Compare\Plugins\"

normally there it should not descend to "aley" directory
and when I remove aley directory, without any change in the script, I recompile the script and the same log becomes:

File: Descending to: "etc\config\nagios\"
File: "commands.cfg" 3783 bytes
File: "contacts.cfg" 2221 bytes
File: "hostgroups.cfg" 136 bytes
File: "localhost.cfg" 7292 bytes
File: "templates.cfg" 11293 bytes
File: "timeperiods.cfg" 3209 bytes
File: Returning to: "etc"
SetOutPath: "$INSTDIR"
File: Descending to: ".\plugins\"
File: "check_apt.exe" 315297 bytes
File: "check_breeze" 2245 bytes

What should be the reason?

Thanks a lot
elwingpenny is offline   Reply With Quote
Old 6th December 2011, 19:58   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,097
File /r "plugins\" (The docs document the difference between multiple and a single path segments)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 7th December 2011, 07:15   #3
elwingpenny
Junior Member
 
Join Date: Dec 2011
Posts: 2
Thanks a lot for your help. It is working perfect now. I posted here before the IRC.
elwingpenny is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
descend, file, folder, nsi

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