Guide: Customising your JWrapper installer (adding install screens etc)
Please Note: this guide assumes you have looked through:
JWrapper does not have a proprietary install language like most other installers. Instead it ensures a JVM is ready early on and then allows you to run Java classes (virtual apps) as part of the install process.
Although your application will use virtual apps to define apps the user runs, it can also define a number of virtual apps with specific names which allow you to customise your JWrapper install and uninstall process. These have all the same setup as your usual app so despite running at install or uninstall time can use any libraries or native code you have available to your standard app. If these virtual apps with specific names exist they will be run automatically by JWrapper at the appropriate times and can even provide feedback into the JWrapper install and uninstall process.
This gives you the entire flexibility and scope of Java, your usual libraries and all the JWrapper libraries to customise your installation. JWrapper provides a range of utility APIs (which it uses itself for much of the installation process) for each type of app to make installation simpler. We plan on building on these so if there are functions which you think are missing which would be useful you can let us know.
The apps you can define to customise your JWrapper install process are:
JWrapper does not have a proprietary install language like most other installers. Instead it ensures a JVM is ready early on and then allows you to run Java classes (virtual apps) as part of the install process.
Although your application will use virtual apps to define apps the user runs, it can also define a number of virtual apps with specific names which allow you to customise your JWrapper install and uninstall process. These have all the same setup as your usual app so despite running at install or uninstall time can use any libraries or native code you have available to your standard app. If these virtual apps with specific names exist they will be run automatically by JWrapper at the appropriate times and can even provide feedback into the JWrapper install and uninstall process.
This gives you the entire flexibility and scope of Java, your usual libraries and all the JWrapper libraries to customise your installation. JWrapper provides a range of utility APIs (which it uses itself for much of the installation process) for each type of app to make installation simpler. We plan on building on these so if there are functions which you think are missing which would be useful you can let us know.
The apps you can define to customise your JWrapper install process are:
- JWrapperUpdateApp - makes decisions about whether to update the app to the latest version (may prompt the user to ask if they want to update for example). Returns its decision by using the exit methods in JWUpdateApp.
- JWrapperJreCompatibilityApp - checks that the current virtual machine (the one it is running in) is acceptable. Can do virtually anything it likes to check giving you much more flexibility than just restricting JVMs to a vendor / version. Returns its decision by using the exit methods in JWJreVerifierApp.
- JWrapperPostInstallApp - once files are downloaded etc this app can perform any post-installation or post-update setup including creating shortcuts (see JWInstallApp). Has the option to request or block the standard shortcuts that JWrapper would otherwise set up or even roll back and uninstall. Returns its decision by using the exit methods in JWInstallApp.
- JWrapperPreUninstallApp - runs before uninstallation (may prompt the user to ask if they want to uninstall for example). Has the option to cancell uninstall, continue uninstall or request that the user be prompted to uninstall by JWrapper. Returns its decision by using the exit methods in JWUninstallApp.
- JWrapperPostUninstallApp - runs after the user has confirmed uninstallation but before any uninstallation actually takes place (may register the uninstallation to a web server or ask the user to fill in a form or remove custom installed components for example). Returns its decision by using the exit methods in JWUninstallApp, can only either continue installation or cancel it.
- JWrapperMatchedVersionServerUnavailable - runs if JWrapper has been instructed to always match the client version to the server (update URL) version exactly but the server is offline or unreachable (may display an error prompt and allow the user to override the update URL etc). Has the option to have JWrapper show or hide a standard one-line error message dialog. Returns its decision using the exit methods in JWServerUnavailableApp.