Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 28th November 2007, 14:51   #1
tieum
Junior Member
 
Join Date: Mar 2004
Posts: 29
Getting NSIS version

Hello,

Is there a way to check NSIS compiler version in a script and to error out if the wrong version is installed?

Thanks,

Tieum
tieum is offline   Reply With Quote
Old 28th November 2007, 15:01   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
!if `${NSIS_VERSION}` < 2.3
!error `Unsupported NSIS version`
!endif

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 28th November 2007, 18:33   #3
tieum
Junior Member
 
Join Date: Mar 2004
Posts: 29
Thanks for pointing me to the right variable.

The code does not work though as $NSIS_VERSION is valued to v2.29

So I changed it to:

!if `${NSIS_VERSION}` != v2.29
!error `Unsupported NSIS version: ${NSIS_VERSION}. Please use version 2.29`
!endif
tieum is offline   Reply With Quote
Old 2nd December 2007, 12:35   #4
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,164
Send a message via ICQ to Yathosho
there was just a slight syntax error in afrow's example

!if ${NSIS_VERSION} < v2.29
!error "Unsupported NSIS version: ${NSIS_VERSION}. Please use version v2.29 or later"
!endif

works for me!
Yathosho is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump