Migrating to install4j 6
In nearly all cases, migrating to install4j 6 just means opening and saving your project with the install4j 6 IDE. Nevertheless, there are some considerations with respect to backwards compatibility and a couple of behavioral changes.
- The minimum Java version for launchers is now Java 6. If your launchers must run with Java 1.4 or Java 5, you have to stick with install4j 5.
- The minimum Java version for the install4j IDE and the compiler is now Java 7. If your build machine only has Java 6 installed, you have to install a Java 7 JRE. On Windows and Mac OS X, Java 7 JREs are bundled in the install4j downloads.
-
The install4j API has been generified and old-style enums have been converted to language enums. Theses changes are
binary and source compatible. The only exception is that enums do no longer extend
com.install4j.api.SerializableEnum
. In the unlikely case that you use this class in your custom code, you will have to replace it with the actual enum class. - Installer variables loaded by the "Load response file" action or the -varfile command line parameter are now automatically registered as response file variables. The eliminates problems with fast-path upgrade installations where response file variables would be lost if their form components were not be shown. If this change impacts on your logic, the "Load response file" action now has a "Register variables for response file" property that you can deselect to revert to the old behavior.
- By default, the "Load response file" action will no longer overwrite installer variables that have been set explicitly on the command line with the -Vvariable=value option. This is the intuitive behavior and makes installer variables more flexible. If this change impacts on your logic, the new "Overwrite strategy" property of the "Load response file" action can be set to "Do not overwrite existing".
- Mac OS X archives are now generated in DMG format. This means that the generated media file name will change between install4j 5 and install4j 6 and you have to adjust download links on your web site. If you would like to keep the .tgz format, you can change the corresponding option on the "Installer options" step of the media wizard.
- Invisible form components are no longer validated. A validation error would leave the user with no clue what to do, so this was really a mistake in previous versions. However, bound installer variables are set during the validation phase and that will no longer happen for invisible components. If you rely on the installer variables to be defined, you should predefine them in the "Installer variables" section of the installer or custom installer application.
- Several installer variables that were previously only defined on Windows are now defined on multiple platforms. New cross-platform installer variables are "sys.desktopDir" and "sys.docsDir". The installer variables "sys.appDataDir", "sys.localAppdataDir", "sys.docsDir", "sys.fontsDir" and "sys.programsDir" are now also defined on Mac OS X. If your code checks if any of these installer variables is null, it may no longer work correctly.
-
The "Reboot computer" action and
Context#triggerReboot
now work on Mac OS X as well. If you rely on the previous behavior of not doing anything on Mac OS X, this may not be what you want. In that case, you have to add platform-specific checks in your project. - The ICNS icon for Mac OS X launchers is now generated from cross-platform images. If you previously had no ICNS icon defined but the "Add icon to launcher" check box was selected, the maximum resolution of your icon files might be too low. You need at least a 128x128 image for the icon to look good on Mac OS X. The old default ICNS icon is still available under resource/macos/app.icns, so you can specify it explicitly to restore the old behavior.
- The name of the uninstaller on Mac OS X has changed if your project is localized. Previously the file name of the uninstaller application bundle was set to the localized name. In install4j 6, the file name is always set in the principle language and the localization is provided by the application bundle. You will see the localized name in the Finder, but not in the terminal.
If you notice anything else, please let us know!
Blog Archive
April/3
2024/5
2023/7
Bringing JProfiler to VS Code with Kotlin Multi-PlatformCaching auto-provisioned install4j distributions in CI pipelinesCross-platform JRE bundle creation under threat from JEP 493
January/1
September/5
2022/10
Garbage collector analysis in JProfilerRecording JFR snapshots with JProfilerEnhanced JFR snapshot analysis with JProfilerWorking with probe events in JProfilerCustomizing telemetries in JProfiler
March/1
January/1
December/2
November/3
2021/2
2020/1
2019/1
2018/3
2017/5
2016/1
2015/10
Using sunburst diagrams for understanding Java memory consumptionUsing flame graphs when profiling Java applicationsProfiling a Netty server
October/1
September/1
August/2
July/1
November/5
2014/3
2013/3
2012/5
2011/13
Analyzing specific parts of the call treeAnalyzing incoming and outgoing calls of a methodCollapsing recursions in the call treeRemote profiling through an SSH tunnelFinding JDBC connection leaks
June/5
December/1
October/2
September/5
2010/8
2009/14
Using the "Run interceptor script" trigger actionCreating a custom probeInspections in the heap walkerHeap walker graph: Finding paths between selected instancesFiltering in the reference view of the heap walker
August/4
Request trackingAnalyzing long-running AWT events with JProfilerProbes overviewCPU profiling: Sampling and instrumentation
February/1