Skip to content
⌘ NSIS Forum Archive

File access at compile time

2 posts

KoenDV#

File access at compile time

Is it possible to have file access at compile time? How would I do this? I'm trying to make an installer that installs a selection of files from the filesystem based on information in a txt/ini file. The compiler script would be called with an ordernumber as argument. Then read a file that looks like this:

[ordernumbre1]
c:/file1
c:/file2

[ordernumbre2]
c:/file1
c:/file3

And include the matching files in the installer. So i would get an order specific installer.

can anybody help me?
thx
Koen
Red Wine#
How about creating a header like,
!ifdef ordernumber1
file "c:\dir1\file1"
file "c:\dir1\file2"
!endif

!ifdef ordernumber2
file "c:\dir2\file1"
file "c:\dir2\file2"
!endif

and call the compiler with /D.

You may even automate the creation of the header, see below,

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.