Archive: some problems during compilation time


some problems during compilation time
Hello,

I have got the task to create an installer for our firm that processes an definition file of the information system (.ini file) and from this file finds out which files and from where then to pack and where then to unpack. At the beginning of this file some variables are defined which
are then used. As I have found out it can not be done much during compilation phase. So I would like to ask if it is possible :

1. To load particular paths to the files (with *.* convention) from the *.ini file to a variable and
then to give this variable to the command File (I have got it in the variable $LiNE and the command File $LINE does not work).

2. To use parameters of the command line during the compilation time (I am interested in values given
to the program makeMSIS.exe and not to the generated one as setup.exe) like the type of installation
(accession (patch) or full) and the name of .ini file (in this .ini file the installation process of
the information system is defined).

3. To generate log. file during the compilation time (we call it "the packing distribution time")
that contains the information which files were successfully packed.

Best regards,

Karel Maèl, Czech Republic.


To read from INI files, use ReadINIStr which is, however, a run-time command. Therefore you need to check this out:
http://nsis.sourceforge.net/wiki/Inv...n_compile-time

You could use compile-time statements to decide what kind of installer to make, which should be triggered by defining a constant via the command-line by using the /D switch, but I'd say it would be much cleaner to just use two NSI scripts (save a load of time too).

For logs, you could run MakeNSIS.exe in command-prompt and send the output to a text file using >> (I think).

-Stu