Skip to content
⌘ NSIS Forum Archive

Detecting build platform

3 posts

quest#

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?
{_trueparuex^}#
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