- NSIS Discussion
- File list for installer..
Archive: File list for installer..
Freddie9000
20th October 2011 11:02 UTC
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
MSG
20th October 2011 11:25 UTC
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.)
Freddie9000
20th October 2011 12:06 UTC
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 ).
Afrow UK
20th October 2011 12:17 UTC
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
Freddie9000
20th October 2011 12:25 UTC
"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....
Afrow UK
20th October 2011 12:33 UTC
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
MSG
20th October 2011 12:36 UTC
Example contents of your filelist.txt:
File "..\bin\foo.exe"
File "..\bin\libs\food.dll"
Freddie9000
20th October 2011 12:40 UTC
@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.
MSG
20th October 2011 15:30 UTC
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.
Afrow UK
20th October 2011 15:46 UTC
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