Skip to content
⌘ NSIS Forum Archive

NSIS and Debug/Release Builds

6 posts

GDILord#

NSIS and Debug/Release Builds

Hi

I am using a user created variable to simulate Debug/Release builds with additional information that I don't want the user to see.


// Main section:
;;;;; Are we in DEBUG mode?
Var /GLOBAL _DEBUGMODE
StrCpy $_DEBUGMODE 1
;;;;; /Are we in DEBUG mode?
Push $_DEBUGMODE
Call funct

// Function funct residing in a .nsh file
Pop $4
IntCmp $4 1 0 +2
DetailPrint "DEBUG: funct: ERROR: error message goes here!"
; Carry on
Is there an easier way?
pospec#
I think that you can do:

!define FORDEBUG
...
!ifdef FORDEBUG
MessageBox MB_OK "FORDEBUG: Blah"
!endif

Defines can be done on command line too.