View Single Post
Old 6th January 2008, 17:37   #9
dllmain
Senior Member
 
dllmain's Avatar
 
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
I did some research in between. I found out the following:
  • The ${NSIS_VERSION} constant was first introduced in 2.0b4
  • 2.15 is the only release in [2.0b4, 2.34] without the "v" prefix in ${NSIS_VERSION}
With that and an idea from here I was able to construct this code for detecting NSIS >=2.34:

Quote:
!ifndef NSIS_VERSION
; Anything before 2.0b4
!error "NSIS 2.34 or later required."
!endif
!define "X${NSIS_VERSION}"
!ifdef Xv2.33 | Xv2.32 | Xv2.31 | Xv2.30 | Xv2.29 | Xv2.28 | Xv2.27 | Xv2.26 | Xv2.25 | Xv2.24 | Xv2.23 | Xv2.22 | Xv2.21 | Xv2.20 | Xv2.19 | Xv2.18 | Xv2.17 | Xv2.16 | X2.15 | Xv2.14 | Xv2.13 | Xv2.12 | Xv2.11 | Xv2.10 | Xv2.09 | Xv2.08 | Xv2.07 | Xv2.06 | Xv2.05 | Xv2.04 | Xv2.03 | Xv2.02 | Xv2.01 | Xv2.0
; Stable releases, 2.15 without "v" prefix
!error "NSIS 2.34 or later required."
!endif
!ifdef Xv2.0b4 | Xv2.0rc1 | Xv2.0rc2 | Xv2.0rc3 | Xv2.0rc4 | Xv2.07b0
; Pre-releases
!error "NSIS 2.34 or later required."
!endif
!undef "X${NSIS_VERSION}"
Please report any bugs you find.
dllmain is offline   Reply With Quote