Archive: Files listed in external text-file instead of listing in an section


Files listed in external text-file instead of listing in an section
Hello,

from an old InstallShield installer I have got a text-file, which gives information, how files should be installed, renamed, etc. under certain conditions.

We want to use this technique with nsis. So it's neccesary to load a configfile as txt or xml.

The configfile looks something like this:

myfile.exe *instdir n o
filename.dll *instdir y k
[...]

The first String is the filename, the second String is the destinationpath, the next Strings are the conditions.

Normally the fileentries are hardcoded in a section of the nsis-script. We want these entries to be dynamic. Therefor we need to know, if it is possible to create the filelist for a section dynamically out of an external file?

We want to use this technique to minimize the time for configuration.

Is there any documentation or examplecode available, which demonstrates this?

Bye, Tobias :)


Not for this exact situation. You'd have to write an external executable to parse the text file and generate a NSIS script.
From within the NSIS script you'd use the compile-time instructions !system (to execute it) and !include to include the generated text file.

The external application could be written in any language of your choice. It could even be written in NSIS:
http://nsis.sourceforge.net/Invoking...n_compile-time

-Stu


Thanks for the reference. I will evaluate this tomorrow.

Greetings, Tobias


This may be possible for multi-file distribution (CD) using NSIS runtime text file functions and CopyFiles instruction. For single exe package some pre-processor required like Afrow UK describes.