Hi,
I currently use two different versions of NSIS. The original and a slightly hacked version with support for some additional commands. In my installer-scripts, i tried to use !ifdef/!endif to make them compile with both versions. Unfortunately this does not work with original NSIS (1.67). Even if !ifdef-ing out some portion of the script, it still checks for known commands and amount of arguments for known commands and then terminates compilation. The attached patch fixes this (IMHO unnecesary) behavior. With that patch applied,
you now can write arbitrary text (like comments) within these disabled areas, just like in C.
Justin, can you please apply this in your next release?
-Fritz
A small flaw in script.c (patch included)
4 posts
I actually found a simpler way of doing this. Simply insert the following two lines into the very beginning of CEXEBuild:😛arseLine():
After thanksgiving, at least...
-Justin
I will include this as part of 1.70. The major change in 1.70 from 1.67 is better support for MBCS. I've updated most of NSIS's internal string handling, all that is left is dialog code page etc updates (I think).
while (*str == ' ' || *str == '\t') str++;
if (ignore && *str!='!') return PS_OK;
After thanksgiving, at least...
-Justin
Originally posted by justinNo, that doesn't catch the following (WHATEVER undefined):
I actually found a simpler way of doing this. Simply insert the following two lines into the very beginning of CEXEBuild:😛arseLine():
...
while (*str == ' ' || *str == '\t') str++;
if (ignore && *str!='!') return PS_OK;
-Justin
At least, it should check for the complete two possible keywords !endif and !else and probably also for a following whitespace.
!ifndef WHATEVER
+-----------------+
! My fancy header !
+-----------------!
!endif
-Fritz
Originally posted by felfert ...Ooops! 1,$s/undef/def/g
-Fritz