|
|
#1 |
|
Junior Member
Join Date: Oct 2007
Posts: 8
|
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 |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
You can use a file list, if you add this in front of every filename:
code: 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.) |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2007
Posts: 8
|
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 ). |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2007
Posts: 8
|
"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.... |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Example contents of your filelist.txt:
File "..\bin\foo.exe" File "..\bin\libs\food.dll" |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Oct 2007
Posts: 8
|
@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. |
|
|
|
|
|
#9 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
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.
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|