cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cpaine
Level 4

Is there anyway to include an action based on build target?

I have a project where I am building installers both with and without a bundled Java VM. For the installer without the bundled JVM I would like to include a pre-install panel action to ask the user which JVM to use. For the installer with the bundled JVM, I don't want this panel to appear. Is there any way to achieve this?
Labels (1)
0 Kudos
(7) Replies
pv7721
Level 20

Use the following variable for evaluation:

$JAVA_HOME$: Installer without VM: Defaults to the value of the java property java.home. Its value can change at the Choose Java Virtual Machine step if the end-user selects a VM Installer with VM: Defaults to the value specified in the Project - Java Task. It can change when the $USER_INSTALL_DIR$ changes, or at the Choose Java Virtual Machine step if the end–user selects a VM already on their machine.
0 Kudos
plazzy
Level 3

I have a project including mysql server, When I adding the sql script and build the project, It aways prompts me that running sql script failure. I instead ";" with "GO" or "\n"; But It did'nt work, I want to know why; Can you show a single example for sql script? If you do'nt mind!
0 Kudos
pv7721
Level 20

Hello plazzy! As far as I can tell, your issue is different than the one cpaine initially reported, so please open a new thread for your issue! Thanks!
0 Kudos
cpaine
Level 4

pv7721 wrote:
Use the following variable for evaluation:


Thanks for the info. I have successfully used the value of $JAVA_HOME$ to achieve what I wanted. What I did was set the folder for the bundled JVM in "Project->Java" to be "bundled_jre", so that I had a distinctive string to test for.

Only slight annoyance is I can't find a way of conditionally choosing the labels used in the list of installer steps displayed on the left of the installer panels. This means I either have to choose to have a label in the list saying "Choose Java Virtual Machine" which is never selected when the installer has a bundled JRE, or choose not to have it there at all, so that for the non-bundled JVM installer there is no specific label selected when the Choose Java Virtual Machine panel is displayed.
0 Kudos
pv7721
Level 20

Good, this is what I had in mind, a special string to test against. For the step in the left pane, I would use "Configure Java", which is selected when the user chooses an external Java or skipped when you install the bundled JRE. Advice: while tempting as it is (give the user more freedom of choice to use an already installed JRE, in practice is more an annoyance for you: in case your application needs a minimum Java version you might need to check the selected JRE if it meets the minimum etc. We used to give this choice of external JRE, but at a certain moment we removed it altogether: relying on the bundled JRE give us the certainty that there won't be any compatibility issues.
0 Kudos
cpaine
Level 4

pv7721 wrote:
For the step in the left pane, I would use "Configure Java", which is selected when the user chooses an external Java or skipped when you install the bundled JRE.


Thanks for the suggestion.

pv7721 wrote:
Advice: while tempting as it is (give the user more freedom of choice to use an already installed JRE, in practice is more an annoyance for you: in case your application needs a minimum Java version you might need to check the selected JRE if it meets the minimum etc. We used to give this choice of external JRE, but at a certain moment we removed it altogether: relying on the bundled JRE give us the certainty that there won't be any compatibility issues.


I take your point. For our product we supply two installers, one with a bundled JRE with no choice of external JRE for a simple straight forward install. The other installer has no bundled JRE and is for more Java-savvy users to avoid them having to clutter up their machines with another JRE.
0 Kudos
cpaine
Level 4

pv7721 wrote:
For the step in the left pane, I would use "Configure Java", which is selected when the user chooses an external Java or skipped when you install the bundled JRE.


Thanks for the suggestion.

pv7721 wrote:
Advice: while tempting as it is (give the user more freedom of choice to use an already installed JRE, in practice is more an annoyance for you: in case your application needs a minimum Java version you might need to check the selected JRE if it meets the minimum etc. We used to give this choice of external JRE, but at a certain moment we removed it altogether: relying on the bundled JRE give us the certainty that there won't be any compatibility issues.


I take your point. For our product we provide two installers. One of them has a bundled JRE with no choice of external JRE for a simple staright forward install. The other installer has no bundled JRE and is intended for more Java-savvy users who don't want to clutter up their machines with another JRE.
0 Kudos