Archive: Installer Bloat Concern


Installer Bloat Concern
I have an issue I am concerned with and can not find a answer so thought I would ask the question.
What I am trying to avoid is bolat of the installer from file commands.
Here is the basic setup

I use macros to define may various files for editing reasons but my concern is that when I insert the macros it is bloating the installer.
For example

 
!Macro AddFiles
File "SomeFile"
!MacroEnd
!Macro NewOnlyFiles
File "otherFiles"
!MacroEnd

Then in the section
${IF} NewInstall
!InsertMacro NewOnlyFiles
!InsertMacro Addfiles
${Else}
!Insertmacro AddFiles
${EndIf}

Now this is simplified and could easily be avoided but would SomeFile be included twice in the installer?

no - the data (in this case, a file) is only included once and then referenced if it is encountered again.

You can override this behavior using the main level instruction:
SetDatablockOptimize off

But you definitely want to just leave that on by leaving it out entirely.

You can easily test this behavior by simply inserting that macro several times and see if the size of your installer grows substantially when compared to just 1 time.