Two installers (.exe) from one .nsi file
I'm trying to generate two .EXE installers from one .nsi file.
Actually I have one installer that generates the installer .exe name based on a variable, like this:
!define INSTALL_TYPE_1 "Type-1"
!define INSTALL_TYPE_2 "Type-2"
!define K_INSTALL_TYPE ${INSTALL_TYPE_1}
!define OUT_FILENAME "MyProduct-${INSTALL_TYPE}.exe"
OutFile "${OUT_FILENAME}"
And inside the sections I chose the files to install based on the install type...
File "docs\doc1.pdf"
File "docs\doc2.pdf"
; only for Type-1 installation.
!if ${INSTALL_TYPE} == ${INSTALL_TYPE_1}
SetOutPath "$INSTDIR\Include"
File "include\header1.h"
File "include\header2.h"
!endif
So, every time I need to compile a new installer I need to compile once, and then change the value of INSTALL_TYPE from INSTALL_TYPE_1 to INSTALL_TYPE_2.
Is there any way to generate both installers (Type-1 and Type-2) running the compiler only once?