Archive: File list for installer..


File list for installer..
Hi,

I want to feed the File command with a txt-File full of files and folders ( with subfolders ) to redirect the file list ( should be out of the nsi - File for better edit ). What it seems that this command doesn't support such a feature. Is there a similar way to define such file list ?

Thanks for reply,
Freddie


You can use a file list, if you add this in front of every filename:

File "

and add a closing " after every filename. If you then do "!include yourfile.txt" inside your section, it'll just insert those file commands.

(Note that you'll still need to add SetOutPath commands if you want to extract files to different directories.)

I can't see this..... "You can use a file list, if you add this in front of every filename:" what does this mean ?

for example:

filelist.txt :
..\bin\foo.exe
..\bin\libs\food.dll

and I need such a code like
File "filelist.txt"

so I don't need to add anything in this nsi-script, if I have to add a file (only in file list ).
Would be cool if there were a way to keep the folder structure automatically ( bin; bin\lib ).


Your generated file needs to be NSIS code (File instructions). You then !include that generated file in your main script where you want the File instructions to be.

Stu


"Your generated file needs to be NSIS code (File instructions)."

What does this mean ? Is an included ascii-txt-file NSIS-Code ? Or do I have to take an other nsi-script that I have to include ?

So please reply with concrete script code based on my example....


Sorry what's so difficult? As you have already said, the File instruction cannot take a list of files. Therefore your list of files needs to be a list of File instructions.

Stu


Example contents of your filelist.txt:

File "..\bin\foo.exe"
File "..\bin\libs\food.dll"


@Afrow UK:
What I want to hear is that there's no way to do this. NSIS is not able to parse a file list given as txt-file.

Thanks for your efforts.


Well, glad to be of service. There's plenty more that could be said about how to parse txt files at compiletime, but don't count on me spending any more time on you anytime soon.


Out of the box, NSIS cannot do this, no. However, you can quite easily generate NSIS script from a list of files using a custom script in any language you choose.

Stu