I have no answer to your general question about file detection during compilation, but I have a solution to how it sounds, how you are trying to execute.
My installers use something like this:
In the CustomBranding.nsh file:
!define CUSTOM_BRANDING !define APPNAME "Brand X" !define LOGO "C:\Brand_X_Logo.png"
In the main installer script:
!include /NONFATAL "CustomBranding.nsh" !ifndef CUSTOM_BRANDING !define APPNAME "Generic" !define LOGO "C:\Generic_Logo.png" !endif
Is this the type of “alternative branding” you are asking about?
source share