Old 20th October 2011, 10:02   #1
Freddie9000
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
Freddie9000 is offline   Reply With Quote
Old 20th October 2011, 10:25   #2
MSG
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:
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.)
MSG is offline   Reply With Quote
Old 20th October 2011, 11:06   #3
Freddie9000
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 ).
Freddie9000 is offline   Reply With Quote
Old 20th October 2011, 11:17   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 20th October 2011, 11:25   #5
Freddie9000
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....
Freddie9000 is offline   Reply With Quote
Old 20th October 2011, 11:33   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 20th October 2011, 11:36   #7
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Example contents of your filelist.txt:

File "..\bin\foo.exe"
File "..\bin\libs\food.dll"
MSG is offline   Reply With Quote
Old 20th October 2011, 11:40   #8
Freddie9000
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.
Freddie9000 is offline   Reply With Quote
Old 20th October 2011, 14:30   #9
MSG
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.
MSG is offline   Reply With Quote
Old 20th October 2011, 14:46   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump