What's new in install4j 4.1
Change release:
Please see the change log for a detailed list of changes.
install4j 4.1 introduces the following notable new features:
New Java code editor. Java-scripting is an important feature in install4j that
is used to program flexible installers with screens, actions, and form components. This version
introduces a state-of-the art Java code editor powered by the eclipse framework
with features that you know from the major Java IDEs. Code completion works for the install4j API, JRE runtime classes
and your custom code:
Context-sensitive Javadoc is available by pressing SHIFT-F1 at any cursor position in
the editor. In addition, the parameter types are now links that open the corresponding Javadoc:
Code analysis is performed on the fly, so you immediately see if there is a problem with your script:
Code gallery. To help you get started with scripting or to get useful pointers for common problems,
install4j now offers a code gallery that can be invoked from the Java editor. In addition to common
entries, the code gallery is context-sensitive and shows special snippets for the current property in a bold
top-level category if available.
File sets in the distribution tree. File sets are an additional level in the distribution tree
that can hold files with the same relative installation path - something that was not possible before.
You can toggle the installation of file sets at runtime with scripting. File sets are also useful
for defining platform-specific files that are excluded at compile time in the media wizard and
as building blocks for installation components.
Redesigned screens & actions tab. Screens and actions are now shown in a tree that better
visualizes the connection between screens and actions. You can disable selected elements in this tree and search
for strings. Instead of copying and pasting elements, you can now reuse them by creating links.
Also, the IDs of all elements can be shown directly in the tree. IDs are useful if you reference
screens or actions in script code.
Auto-update functionality. You can now add updater installer applications to your projects
that check for new versions. When you build your project, an update descriptor file (updates.xml) is created
that you can place on a web server to communicate the new version to your users. The updaters read this file
and download new versions if appropriate.
Most of the logic in the updater installer application is not hard-coded,
but is exposed as a collection of form components and scripts, so you can customize it according to your own needs.
install4j offers several templates for different standard scenarios for updaters. Starting from
one of these templates, you can add your own customizations if necessary.
If you want to check for updates on a regular schedule, the UpdateScheduleRegistry class helps you
to find out when to check. To display update information directly in your application, the
UpdateChecker class can be used from the install4j API. When you start an updater from your application
with the ApplicationLauncher class, the updater can shut down your application, so that the update
installer can modify your existing installation.
Custom installer applications. The updater application shown above is just an example of a more general
new feature in install4j 4.1: You can define additional installer applications that will be added to
your installation and can be executed by the user or invoked by your application. You can use screens,
actions and form components to program maintenance applications that reuse parts of the installation sequence.
Another use case is that of "first-run installers" for archives where there is no installer and initialization
is performed when the user first starts the application.
Action and screen groups. You can now organize your screens and actions into groups. This not only has
the advantage of greater manageability, but also gives you additional control flow options: A group has a
condition expression that can be used to skip the entire group. With the loop expression, you can execute the group
multiple times as long as the expression is true. In addition, action groups offer common error handling.
Groups are also useful as link targets if you want to reuse parts of your installer sequence in a custom
installer application. Instead of linking to many screens and actions, you can link to a small number of groups instead.
Comments. You can now add comments to applications, screens, actions and form components. By default,
installer elements do not have comments. When you add a comment, a new "Comments" tab will be added to the
configuration pane. Keyboard actions are provided to quickly jump between all comments in the project.
Installation types. A common requirement for an installer is to present the user with several
default installation types, such as "Full", "Standard" and "Custom". In the new installation type standard screen
you can configure several sets of installation components from which the user can choose when the installer runs.
Installation types have descriptions and can optionally be customized by the user on the "Installation
components" screen.
Design-time JDK selection. Previously, install4j compiled scripts against the runtime library of the
JRE that the install4j IDE or the command line compiler was running with. Now you can configure design-time
JDKs and JREs that will be used for script compilation as well as for code completion of runtime library classes
and context-sensitive Javadoc.
Support for Java 6 splash screens. install4j Windows launchers now support Java 6 splash screens.
Previously, Java 6 splash screens were not displayed on Windows since the -splash VM parameter must be
handled by the native launcher.
PDF screen and action. ej-technologies has partnered with Crionics Inc.
to provide a screen that can display PDF documents as well as an action that shows a PDF file in a standalone viewer. This is
a cross-platform solution that does not require the installation of any native binaries.