I create a set of installers with install4j, and would like a quick way to check the version info of the installer executable
Traditionally, this would involve calling something like installer-name.sh --version
Ideally, this would work without needing to unpack the bundled JRE, but I notice that even the -h help for install4j installers unpacks the JRE, so I am assuming that is not an option...
What I'd like to know is:
- Is there any way to specify options like
-h, which do one task (like print version info), and then exit gracefully - Alternatively, if I will need to parse out this option myself using
context.getExtraCommandLineArguments(), is there a way to successfully exit an installation after a certain action runs, without needing to force a "Quit on failure".- I'd like to avoid a situation where I have one action which handles a
--versionand then the rest of my installation in a conditional group.
- I'd like to avoid a situation where I have one action which handles a
==============
To be clear what I mean by the last point is that I would like a solution like (framing install4j installation actions as a Java function):
if(versionRequested){
printVersion();
return;
}
//all the rest of my installation actions
rather than:
if(versionRequested){
printVersion();
}
else{
//all the rest of my installation actions
}