Yrlec
Yrlec

Reputation: 3458

Handling different release schedules in Install4j

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:

  1. One command-line argument specifying which build it is (this is used to determine which server environment to connect to etc.).
  2. 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?

Upvotes: 2

Views: 102

Answers (1)

Ingo Kegel
Ingo Kegel

Reputation: 48105

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

${compiler:variableName}

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"/>).

Upvotes: 2

Related Questions