Old 17th May 2006, 10:17   #1
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
!if isn't working correctly?

Hi there.

I have a problem with an Plugin (HwInfo) and the values I got returned.

E.g. I am asking for the System-memory. Its 1024.

Now I wrote a little .onInit function:
PHP Code:
HwInfo::GetSystemMemory
StrCpy $R0 
$0
   MessageBox MB_OK $R0
   
!if 1500 $R0
   Detailprint 
"This system has less memory as required!"
      
MessageBox MB_YESNO "This system has $R0 MB Memory but 1500 MB is at least required. Continue Installation?" IDYES GetSystemMemoryEnd IDNO +1
      Abort
   
!else
      
Detailprint "System has $R0 Memory"
   
!endif 
But this section is never called. But 1024 IS smaller then 1500. Does this make any sence?
dbach is offline   Reply With Quote
Old 17th May 2006, 11:08   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
use LogicLib.nsh for ${If} ${Else} etc statement

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 17th May 2006, 12:10   #3
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Quote:
Originally posted by Red Wine
use LogicLib.nsh for ${If} ${Else} etc statement
Thanks Red Wine. I will try it. Is the non-working !if a known bug or just a mistake of usage by myself?
dbach is offline   Reply With Quote
Old 17th May 2006, 13:09   #4
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
!if is a compile-time statement, not a runtime statement.

In other words, it's only used by the compiler and not by the actual setup program.
Comperio is offline   Reply With Quote
Old 17th May 2006, 14:37   #5
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Quote:
Originally posted by Comperio
!if is a compile-time statement, not a runtime statement.

In other words, it's only used by the compiler and not by the actual setup program.
Ah, didn't saw that. Thanks a lot.
dbach is offline   Reply With Quote
Old 19th May 2006, 07:51   #6
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Once again, thanks for you help folks!
dbach is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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