[izpack-devel] Additions to executefile element and ProcessPanel panel
donald
donaldm at tricom.co.za
Wed Jan 4 10:40:07 CET 2006
I have made the following additions to the ProcessPanel code which I
could add to the patch manager if anyone thinks they might need them or
would like to suggest changes or improvements:
1] stdin element in executefile
Description:
Added an stdin element to the executefile element to allow input from a
user or from a named pipe.
Motivation:
Many console based executables require simple input eg answering yes or
no to accept a license. This change allows the display of a text box in
the ProcessPanel only for those executefile's that have an stdin element.
Source Files:
ProcessPanel.java, ProcessPanelWorker.java, AbstractUIProcessHandler
(ProcessPanelAutomationHelper due to interface changes in
AbstractUIProcessHandler)
Example:
<executefile name="$JAVA_HOME/jai-1_1_2_01-lib-linux-i586-jre.bin"
pwd="$JAVA_HOME" >
<stdin type="user"> <!-- user input (text box in
ProcessPanel) -->
</stdin>
<executefile name="$JAVA_HOME/jai-1_1_2_01-lib-linux-i586-jre.bin"
pwd="$JAVA_HOME" >
<stdin type="pipe" path="/tmp/np"> <!-- input from
a named pipe -->
</stdin>
</executefile>
2] pwd attribute for executefile element
Description:
Added a pwd attribute for executefile that allows the user to specify
the working directory to be used when executing the application.
Motivation:
Some install scripts (eg JAI the Java imaging library) require that the
executable be executed from within a particular directory (in JAIs case
the Java home directory).
Source Files:
ProcessPanel.java, ProcessPanelWorker.java,
Example
<executefile name="$JAVA_HOME/jai-1_1_2_01-lib-linux-i586-jre.bin"
pwd="$JAVA_HOME" >
<stdin type="user"> </stdin>
</executefile>
3] env elements for executefile element
Description:
Added a env element similar to the arg element for executefile that
allows the user to specify environment variables when executing the
specified application.
Motivation:
There may be occasions when a application requires a environment
variable to be set eg LD_LIBRARY_PATH.
Example
<executefile name="/bin/bash" pwd="/" >
<env>LD_LIBRARY_PATH=./
</env>
<env>CC=gcc-3.4
</env>
</executefile>
Source Files:
ProcessPanel.java, ProcessPanelWorker.java,
Thanks,
Donald Munro
More information about the izpack-devel
mailing list