Using Izpack to create an installer with Ant

ok i found another solution

adding the word “start” in batch file hides the dos window completely

e.g.

my startup.bat file looks like following

:run
if “%1” == “-debug” goto debug
start javaw -Dappdir=… -cp …/lib/windows/jmf.jar;…/lib/startup.jar;…/lib/windows/jdic.jar;…/resources; …/lib/windows; -Djava.library.path="…/lib/windows" org.jivesoftware.launcher.Startup
goto end

so remove the -noconsole from shortcutSpec.xml and modify the batch file with adding start and replace java with javaw

Although this hides the dos prompt but there is still a problem. after logging in , we have two Spark icons on the right hand side toolbar. and obviously one of them is that of the dos window.

I do not know how to fix that.

best regards

mazhar

Hi again,

has anyone succeeded to use bundled jre with izpack and launch4j? if yes kindly let me know how to compile spark with bundled jre.

best regards

mazhar

No. :frowning: and ofcourse the cmd prompt window also.

If anyone is getting an error when they try to run their installer that says “This application requires a java runtime enviroment”

Change the line in the spark.xml file that says:

jdkOnly

to:

I just downloaded the latest from svn and the build.xml file appears to already have the proper options for izpack and launch4j …

while building iam getting below error

`installer.izpack.exe:
[exec] Traceback (most recent call last):
[exec] File “C:\PROGRA~1\IzPack/utils/wrappers/izpack2exe/izpack2exe.py”, line 126, in
[exec] main()
[exec] File “C:\PROGRA~1\IzPack/utils/wrappers/izpack2exe/izpack2exe.py”, line 123, in main
[exec] create_exe(parse_options())
[exec] File “C:\PROGRA~1\IzPack/utils/wrappers/izpack2exe/izpack2exe.py”, line 77, in create_exe
[exec] subprocess.call(p7zcmd, shell=use_shell)
[exec] File “C:\Python27\lib\subprocess.py”, line 493, in call
[exec] return Popen(*popenargs, **kwargs).wait()
[exec] File “C:\Python27\lib\subprocess.py”, line 679, in init
[exec] errread, errwrite)
[exec] File “C:\Python27\lib\subprocess.py”, line 896, in _execute_child
[exec] startupinfo)
[exec] WindowsError: [Error 193] %1 is not a valid Win32 application

BUILD FAILED
E:\Java Projects\Spark Projects\EastIT - Copy\build\build.xml:873: exec returned: 1`

Below is code at which getting error.

<target name="installer.izpack.exe" depends="installer.izpack" description="build release executable izpack installer">
        <exec executable="python" failonerror="true">
            <arg line="${installer.izpack.dir}/utils/wrappers/izpack2exe/izpack2exe.py"/>
            <arg line="--file=${basedir}/installer/EasyIT-installer.jar"/>
            <arg line="--output=${basedir}/installer/EasyIT-installer.exe"/>
            <arg line="--no-upx"/>
        </exec>
    </target>

error is throwing at

<exec executable="python" failonerror="true">

how can i resolve above issue

Is it due to this thread being from 2009 that I can’t find:

/installer/spark-installer.jar

Thanks