Archive: Detecting build platform


Detecting build platform
Certain parts of my installer script do build time operations that can only be done on windows boxen, most notably gathering registration info from shared DLLs. However, I would like to be able to build installers on Linux anyway, without e.g. DLL registration. Therefore, I'd like to be able to do conditional compilation based on build platform. I can't find out how to access build platform. Can anyone give me a clue?


Since NSIS v2.16 there is NSIS_WIN32_MAKENSIS define for just that :)

!ifdef NSIS_WIN32_MAKENSIS
; Do your win32 thing
!else
; Do your linux thing
!endif


Verily. Thanks.