Archive: !include <file.nsh> .- What do YOU think?


!include <file.nsh> .- What do YOU think?
Hi everyone!

this is open for discussion now.

i recently submitted a patch that adds the possibility to !include files so that makensis wont search them in the current directory but in include directories (default dir and !addincludedir's) only.

problem now is:
kichik does not like the c-style syntax with <bla.nsh>, because of some problems with spaces and general handling of tokens in nsis.

working examples:
!include <testfile.nsh>
!include <test\file.nsh>

working but crappy example:
!include "<test file.nsh>"

non-working example:
!include <test file.nsh>

now how to solve this?

plz post any ideas below!


Its not a bad idea, but IMO NSIS needs to add several compile time functions (e.g. !IfFileExists)


I think the /switch is the only way to go. C-style <blarg.nsh> just isn't the NSIS style.


leave me alon, no one needs this!
:p
I don't see problem in the current style.
!include"dummy.nsh"

I think is nice to NSIS be unique. :)

I don't see problem in the current style.
you did not get the point....

!include "dummy.nsh" will be kept, but topic is about an advanced !include that does ONLY include files from declared include directories.

!include "dummy.nsh" will include the dummy.nsh file, even if its just in the current working directoriy, or in the same directory as the .nsi file you're compiling.

while !include <dummy.nsh> or whatever will just include the file, if its in ${NSISDIR}\include or in any other folder declared by !addincludedir.

got it now? :)

I think the !include /switch "dummy.nsh" could give more ability.

Some idea for switch usage :
- skip if not found
- force using local or remote if both are exist
- set the search order (local or remote first)


- skip if not found
That's already possible with /nonfatal :)

guess we'll stick with the switch :)