Within the code, we use !if statements to resolve the conditionally compiled parts, e.g.makensis /DINSTALL_CONFIG="TYPE1" installer.nsi
!if ${INSTALL_CONFIG} == "TYPE1"
MessageBox MB_OK "This is a Type 1 installation"
!elseif ${INSTALL_CONFIG} == "TYPE2"
MessageBox MB_OK "This is a Type 2 installation"
; And so on, for other types
!endif
This worked fine when we had only a small number of types, but - as is the way of things - the number has grown. We'd really like to be able to check for various different values of the compile-time constant, i.e. if ${INSTALL_CONFIG} is "TYPE1", or ${INSTALL_CONFIG} is "TYPE2", or ${INSTALL_CONFIG} is "TYPE3" then do this, else do that.The documentation for !else mentions || and && operators, but provides no examples. I've been unable to find a way to use the || operator to do this in a way that compiles, and the error message suggests that I can only use them with values, rather than expressions.
Is it possible to this, or am I going to have to kludge it?