The IzPack native launcher will first check for a JRE on the target system. If one is found, then it will launch the installer. If no JRE can be found, then it will help the user in installing one either from the internet or from a bundled one. To sum-up, the IzPack native launcher will allow your users to install your software even if they don't have a JRE at first sight.The IzPack native launcher is a .exe file that looks for a file called
launcher.ini in the current directory. The
launcher.ini specifies:
The way we do this is based on Notes about IzPack Launcher and possible alternatives.
$PTII/adm/gen-X.Y/jre
svn co http://svn.berlios.de/svnroot/repos/izpack/izpack-src/trunk
c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.xml \ -b c:\cxh\ptII\adm\gen-6.0 \ -o c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.jar \ -h c:\cxh\src\izpack\trunkWhere
c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.xmlinstall.xml-b c:\cxh\ptII\adm\gen-6.0-o c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.jar-h c:\cxh\src\izpack\trunkNo valid IzPack home directory found-> Fatal error : No valid IzPack home directory found java.lang.IllegalArgumentException: No valid IzPack home directory found at com.izforge.izpack.compiler.CompilerConfig.resolveIzPackHome(CompilerConfig.java:1908) at com.izforge.izpack.compiler.CompilerConfig.main(CompilerConfig.java:1835) at com.izforge.izpack.compiler.Compiler.main(Compiler.java:622)The solution is to copy
ShellLink.dll
cp c:/Pro*/izpack/bin/native/izpack/ShellLink.dll izpack
Uninstaller not found: c:\cxh\src\izpack\trunk\lib\uninstaller.jar-> Fatal error : c:\cxh\ptII\adm\gen-6.0\ptII6_0_devel_setup.xml:18: Uninstaller not found: c:\cxh\src\izpack\trunk\lib\uninstaller.jar com.izforge.izpack.compiler.CompilerException: c:\cxh\ptII\adm\gen-6.0\ptII6_0_devel_setup.xml:18: Uninstaller not found: c:\cxh\src\izpack\trunk\lib\uninstaller.jar at com.izforge.izpack.compiler.CompilerConfig.parseError(CompilerConfig.java:1523) at com.izforge.izpack.compiler.CompilerConfig.findIzPackResource(CompilerConfig.java:1488) at com.izforge.izpack.compiler.CompilerConfig.addInfo(CompilerConfig.java:1199) at com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:316) at com.izforge.izpack.compiler.CompilerConfig.main(CompilerConfig.java:1854) at com.izforge.izpack.compiler.Compiler.main(Compiler.java:622)Solution, use ant:
cd trunk/src ant distI'm not sure how to do this from Eclipse. Eclipse can run ant but the setup instructions have us include files from
src/lib,
not src.
I had a problem with OsVersion missing when I ran
java -version uninstaller.jar
The solution was to check out the 3.9 branch and rebuild:
svn co http://svn.berlios.de/svnroot/repos/izpack/izpack-src/branches/branch-3.9/ cd 3.9.0-M1/src ant
I also had to edit build.xml so that we included izpack/util/os/*.class as per The Unistaller.jar is not working
It turns out that part of the install process updates uninstaller.jar. So, I had to copy the uninstaller.jar file
over to the installed version of IzPack - copying uninstaller.jar
to the installed application will not do it.
The solution is to use the ProcessPanel and define our own class that does the extraction.
Cannot find Resource ProcessPanel.Spec.xml for language engcom.izforge.izpack.installer.ResourceNotFoundException: Can not find Resource ProcessPanel.Spec.xml for language eng at com.izforge.izpack.installer.ResourceManager.getLanguageResourceString(ResourceManager.java:137) at com.izforge.izpack.installer.ResourceManager.getInputStream(ResourceManager.java:154) at com.izforge.izpack.installer.ProcessPanelWorker.readSpec(ProcessPanelWorker.java:109) at com.izforge.izpack.installer.ProcessPanelWorker.run(ProcessPanelWorker.java:233) at java.lang.Thread.run(Unknown Source) Error parsing XML specification for processing.Solution:
<res src="ProcessPanel.Spec.xml" id="ProcessPanel.Spec.xml"/>
-u command:
jar -fu c:/Program\ Files/IzPack/lib/installer.jar ExtractJarFile.class
We also have to update the standalone-compiler.jar file
with the new installer.jar file. My solution was to rebuild
izPack and run
cd izpack/trunk/src
rm ../lib/installer.jar
ant build.installer
jar -uf ../lib/installer.jar ExtractJarFile.class
ant build.standalone-compiler
cp ../lib/standalone-compiler.jar ../../izpack3.9.0/lib/standalone-compiler.jar
However, a better solution is to use
<jar src="ExtractJarFile.jar"> in the
install.xml file
Error accessing processing classsrc/lib/com/izforge/izpack/installer/ProcessPanelWorker.java so that it printed the exception, which was
Class com.izforge.izpack.installer.ProcessPanelWorker$ExecutableClass
can not access a member of class ExtractJarFile with modifiers "private".
$PTII/bin/ptinvoke.in is read by $PTII/configure and
$PTII/bin/ptinvoke is created. $PTII/bin/makeapp is
a symbolic link to ptinvoke. Running make in
$PTII/bin invokes makeapp and creates
$PTII/bin/Ptiny.app/ and $PTII/bin/Vergil.app/.
Double clicking on Ptiny.app or Vergil.app invokes
a binary listed in Info.plist. The binary changed between
Java 1.6 and 1.8.
In Java 1.8, we used http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/package_for_mac.html, which uses the Application Bundler.
Application Bundler is GPL'd, but Oracle releases it using the
Classpath exception. The Application Bundler jar file
includes JavaAppLauncher, which gets copied
to Contents/MacOS/. That executable processes
the Info.plist file. The
executable substitutes $APP_ROOT when it is present in the
Info.plist file.
The Application Bundler will include a JRE
if runtime parameter is set in the build.xml file.
We do not set runtime.
The Application Builder wants to copy the jar files
into Contents/Java/. Instead, we
use $APP_ROOT/../.. to refer to the jar files.
We created a temporary Ant target to create a prototype
app directory and then modified the ptinvoke.in
file to generate the proper
Info.plist file.
Last Updated: $Date: 2014-11-21 23:41:13 +0100 (Fri, 21 Nov 2014) $