
The values of installer variables and localization keys are determined at runtime, so you Replacement is automatically available for all properties of type. Writing custom persistence delegates will generally not be necessary unless you want to serializeĬompiler variables are replaced in the serialized representation of a bean. You can specify a list of additional persistence delegates for non-default types. In your bean infos for screens, actions and form components
#Install4j runtime how to#
To learn more about JavaBeans serialization, visitįor API documentation on the long-term persistence mechanism for JavaBeans.įor information on how to write your own persistence delegates. Install4j serializes all instances of screens, actions and form components with the default serialization mechanism for To add dependency JAR files that are included in the installers if any of the contained elements are used Which displays your custom elements alongside the standard elements that are provided by install4j and allows you
#Install4j runtime code#
If you want to ship your custom code to third parties, consider packaging an Or search for suitable elements in your custom code. When you addĪn action, screen or form component, the first popup gives you the choice on whether to add a standard element Selectable in the install4j IDE, you first have toĬonfigure the custom code locations on the "Installer->Custom Code & resources" step. Install4j provides four extension points:Īll actions, screens and form components in install4j use this API themselves. How to debug your custom elements, see the The entire install4j API is contained in the single artifact with maven coordinatesįor a general overview on how to start developing with the install4j API, how to set up your IDE and To develop custom elements in your IDE, you have to add the install4j API to the compilation class path. That are useful in expression/script properties. Many other context methods are only useful if you develop custom elements for install4j.Īlso have a look at the class which offers a number of utility methods

Methods provide the easiest way to achieve this. GoForward(.), goBack(.) and goBackInHistory(.) These methods includeĭepending on the user selection on a screen, you might want to skip a number of screens. The context provides a number of boolean getters that you can use for conditionally executing screensĪnd actions depending on the installer mode and environment. Often, condition expressions for screens and actions check the values of variables. "Set a variable action" where you don't have to call setVariable yourself.Ĭonditionally executing screens or actions Note that besides the "Run script" action, there is also a

Methods allow you to query and modify installer variables. The getVariable(String variableName) and setVariable(String variableName, Object value) "Run script" action on the "Startup" screen. You can change the default installation directory for the installer. Some common applications include:īy using tInstallationDirectory(File installationDirectory) in the installer context, The context allows you to query the environment and the configuration of the installer as well as to perform someįor the complete documentation of all methods in the context. The most important element in this respect isĬom.Ĭom. Wiring together screens and actions as well asįor the conditional execution of screens and actions. Using expression/script properties in install4j is required for The use of the interfaces required to extend install4j. Install4j will package it with the installer and put in into the class path. The location of your custom code classes must beĬonfigured on the "Installer->Custom Code & Resources" step, so If you would like use your IDE while writing more complex custom code, you can put a single call toĬustom code into expression/script properties. Of custom elements in install4j is rarely necessary for typical installers, most simple custom actions canīe performed with a "Run script" action and most custom forms can be realized with a "Customizable form" screen. In the configuration GUI and for the development of custom elements in install4j.

There are two different use cases where the install4j API is required: Within
