Archive: possibility to recursive include (files) from directories


possibility to recursive include (files) from directories
  Dear community,

I am looking for the possibility to integrate directories, and all included files.
Right now I use

...(blah)

>SetOutPath "$INSTDIR\\Path\\to\\prog"
>FILE "C:\\Path\\to\\file_1"
>FILE "C:\\Path\\to\\file_2"
>FILE "C:\\Path\\to\\file_n"
>...(blah)
Is there another method to integrate files? A package with ~20.000 files makes this uncomfortable.

Be patient please, cos I'm new with NSIS and haven't found all the tricks :-)

MosesTycoon

Sure, just use:

File/r C:pathto*.* 

Simple as that ;)

Thx kichik,

I love this tool, every day a bit more....


KICHIK -

Another quick question. How is the behavior of this Parameter "FILE /r"?

If there are several recursive directories, like "dir\sub-dir1\sub-dir2", what do I have to be aware?

Seems that the installer doubles (even tribles) the recommended size of space.

Does this parameter creates the sub-dirs as well?

(EXAMPLE:

  Section"MySQL4.0.10" secMySQL4

SetOutPath "$INSTDIR\\MySQL4"
FILE /r "C:\\Path\\to\\MySQL4\\*.*"

>;MySQL Binaries
SetOutPath "$INSTDIR\\MySQL4\\bin"
FILE /r "C:\\Path\\to\\MySQL4\\bin\\*.*"

>;MySQL Data
SetOutPath "$INSTDIR\\MySQL4\\data\\mysql"
FILE /r "C:\\Path\\to\\MySQL4\\data\\mysql\\*.*"

>;MySQL Share
SetOutPath "$INSTDIR\\MySQL4\\share\\charsets"
FILE /r "C:\\Path\\to\\MySQL4\\share\\charsets\\*.*"

SetOutPath "$INSTDIR\\MySQL4\\share\\english"
FILE /r "C:\\Path\\to\\MySQL4\\share\\english\\*.*"

SetOutPath "$INSTDIR\\MySQL4\\share\\german"
FILE /r "C:\\Path\\to\\MySQL4\\share\\german\\*.*"

If you add the /r flag (recursive) you don't need to add every sub-directory separately. /r means it will add every sub-directory too.

SetOutPath "$INSTDIR\MySQL4"

>File /r "C:\Path\to\MySQL4\*.*"
Is enough in your case.

And it copies the files to the right destination (subdirectories)?


Of course! Would you expect less? :D


Thx!
Let's dance (again)...