Orangevolt ANT Tasks » Tasks » sfx | ||
sfx | Dynamic commandline example |
Suppose an sample application named layxx with the following directory structure
|
Zip the directory structure to an archive (layxx.zip for example).
Create a Ant make file with the following content:
build.xml | ||||||||||||||||||||||||||||||||||||||||||||||
|
Thats it. After running Ant you have 5 exectables created by sfx.
When starting the windows executable created by this example the contents of the executable are extracted to [temp-dir]/layxx.exe, the current directory is set to [temp-dir]/layxx.exe/bin and layxx.bat will be started.
As you can see in the example you don't really need to create start scripts for your application. It is also possible to pack the whole start command into the execute attribute.
Attention windows exececutable creators : The created java jar files are only working successfully when started from command line. Otherwise the current working directory is not known and the archive cannot extract itself.