Reputation: 2085
i have a izpack installer and inside of it my project with a media folder(500 MB). When i start the installer, i must wait a few seconds because it unpacks all files.
My question is: Can i select files(the media folder) outside the package to copy it, to the installpath?
With google i found only the solution on bottom of this page: https://groups.google.com/forum/#!topic/izpack-user/mjA6AXzSouw
Upvotes: 0
Views: 796
Reputation: 1493
you can run an ANT target to copy this media file (presumably extracted from the same .zip file which contains installer.jar
, although this is up to you).
install.xml:
<listeners>
<listener classname="AntActionInstallerListener" stage="install" />
<listener classname="AntActionUninstallerListener" stage="uninstall" />
</listeners>
UserInputSpec.xml:
<field type="file" align="left" variable=
"the.file"
>
<spec txt="" size="25" set=""/>
</field>
UserInputPanel:
ask user to locate and select the media file, through the File Chooser
field. The file location will be saved in the.file
variable, as shown above.
AntActionsSpec.xml:
<antcall buildfile=
"location of ANT_XML_FILE"
order="afterpacks">
<target name=
"copyFile"
></target>
<property name=
"dest.dir"
value=
"$INSTALL_PATH"
></property>
<property name=
"the_file"
value=
"${the.file}"
></property>
</antcall>
ANT_XML_FILE:
<target name=
"copyFile"
>
<copy todir=
"${dest.dir}"
file=
"${the_file}"
/>
</target>
Upvotes: 1