Conditional Compilation !define
Hi,
currently we have a software project, which calls the installer compilation after the compilation of the main product. Since we also have customer specific distributions, we use
- /D during compile time to set "changing" definitions, which changes with each built, like product version number
- a settings.nsh, where we set not changing definitions, but specific to this distribution, like branded application names
- a settings_pre.nsh, which containts definitions, which will be common in all distributions, but which should be able to be changable
The .nsh files are loaded in the main .nsh script at the beginning in the following order:
!include "settings_pre.nsh"
!include "settings.nsh"
!include "variables.nsh"
Originally Posted by settings.nsh !define APPNAME "App Name"The settings.nsh looks like that, but setting the common definitions, however APPCONFIGNAME for example is also in it and should be overwritten in the later loaded settings.nsh, if it exists there.
!define APPBINARYNAME "App Binary Name"
!define APPCONFIGNAME "App Config Name"
...
...
My specific problem is the "already defined" error, if a definition was already set, but maybe changed during compiling the installer or in the settings.nsh.
Therefore the following questions arise:
1) Do the /D commands during compile time overwrite !define in the script?
2) How can I accomplish that definitions "maybe" loaded by the settings.nsh overwrite definitions in the settings_pre.nsh (you could call it "standard definition file")?