NSIS/Source/Tests/preprocessor.nsi

43 lines
612 B
NSIS
Raw Normal View History

Name preprocessor
OutFile preprocessor.exe
!ifdef some_define_that_doesnt_exist
this should not be executed, so no error should be raised
/*
code inside comments should not be executed
!ifdef
*/
!endif
!ifdef d1
!error "d1 is not defined!"
!else ifdef d2
!error "d2 is not defined!"
!else
# this should be compiled
!endif
!define d1
!ifdef d1
# this should be compiled
!else ifdef d2
!error "d2 is not defined!"
!else
!error "d1 is defined!"
!endif
!undef d1
!define d2
!ifdef d1
!error "d1 is not defined!"
!else ifdef d2
# this should be compiled
!else
!error "d2 is defined!"
!endif
Section
SectionEnd