How to create some setups from one project

How to create some setups from one project

CreateInstall allows you to create some setups by suing only one project. You can use this feature if your setups have little differences. You have to define global variables for the each setup on Setup Builder page. You can create up to 7 different installations for one project. After that, specify these variables as $variable_name$ in your project. They will be substituted before making installations. Don't forget to modify the setup file name oк the output folder so that setups don't overwrite each other.

Output folder => c:\my setups\$ver$
Setup file => setup$itype$.exe

Build setup

By default, CreateInstall creates the installation for the first set of the global variables. You can create an installation with different sets of the variables by using the option -m<i> from the command line. See Command Prompt Mode for more details.

Also. you can use the menu item Setup - Multi Build. It allows you to create installations for the each set of the global variables. See Multi Build for more details.

How to enable or disable commands depending on the global variables.

The command Source code can compile or ignore commands depending on values of the global variables.

For example, you have global variables var1 and var2. You want that some command is compiled only if the value of var1 is not zero and var2 equals free string.

Add the command Source code to the project script and insert required commands into it.. After that, specify the following code in the Source code command:

ifdef $var1$ && "$var2$" %== "free"
{
   $body$
}
If you want to skip some commands during the installation process then assign global variables to variables with Set Variables commands and use them in condition expressions and commands.