Problem parsing directory for installation of files
Hi,
I'm a newbie to NSIS.
I want to write an installation script for my application. The files to be installed will probably change in the future. Therefore I don't want the files hardcoded in my script. Instead I try to find the files to be installed by recursively searching through a directory.
Here is part of my code:
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
${RecFindOpen} "${SOURCEDIR}" $R0 $R1
MessageBox MB_ICONINFORMATION|MB_OK "SetOutPath $INSTDIR\$R0"
SetOutPath "$INSTDIR\$R0"
${RecFindFirst}
MessageBox MB_ICONINFORMATION|MB_OK "File ${SOURCEDIR}\$R0\$R1"
File /nonfatal "${SOURCEDIR}\$R0\$R1"
${RecFindNext}
${RecFindClose}
SectionEnd
When I compile this script I get a warning for the line 'File /nonfatal "${SOURCEDIR}\$R0\$R1"': no files found. I was hoping that adding the attribute /nonfatal would lead to a compiled script that runtime is executed correctly.
However the messageboxes show the paths and filenames as expected, but nothing is installed.
Why are the commands SetOutpath and File not working when I use variables?
How can I solve this problem?
Thanks in advance for any help...