I am currently evaluating Install4J for my company. We have a use case where want to be able to handle the following builds: development, pre-release and production. They will only differ in two ways:
- One command-line argument specifying which build it is (this is used to determine which server environment to connect to etc.).
- The release schedule.
For example: we want to be able to release a new version of our software to a small group of people with the pre-release version installed and once we feel that it is stable enough we want to create a production-release. We want the auto-update feature to automatically understand that it shouldn’t mix between release types (i.e. if you have pre-release installed you should only get pre-release updates).
How can we achieve this without creating 4 completely separate setup projects?
You can use compiler variables to do that. Define the appropriate compiler variables on the General Settings->Compiler Variables tab and use them with the syntax
in other text fields. There is a variable selector (an arrow to the right) next to all text field that allows you to select variables from a list.
When building, you can override compiler variable values from the command line (
-D NAME=VALUE[,NAME=VALUE]) or from the ant task (child elements<variable name="variableName" value="variableValue"/>).