Issue Details (XML | Word | Printable)

Key: IZPACK-114
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Julien Ponge
Reporter: Olivier Chédru
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IzPack

Ability to set environment variables when using ProcessPanel

Created: 13/Jun/08 05:56 AM   Updated: 25/Sep/08 02:45 AM
Component/s: Installer
Affects Version/s: 4.0.0
Fix Version/s: 4.1.0

Time Tracking:
Not Specified

File Attachments: 1. Java Source File ProcessPanelWorker.java (21 kB)
2. Text File ProcessPanelWorker.java.patch (3 kB)


Patch Submitted: Yes


 Description  « Hide
Sometimes it is necessary to set specific environment variables when starting processes with ProcessPanel.
I modified ProcessPanelWorker.java to accept <env> elements just as in the following example:

<processing>
<job name="Performing some post install task requiring a specific environment variable">
<os family="windows" />
<executeForPack name="Server files" />
<executefile name="$INSTALL_PATH\bin\postinstall.exe">
<arg>foo</arg>
<arg>bar</arg>
<env>MY_PRODUCT_HOME=$INSTALL_PATH</env>
</executefile>
</job>
</processing>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Julien Ponge added a comment - 29/Jun/08 03:53 PM
Sounds good, this will be scheduled for 4.1.0.

I have yet to review the proposed solution, but meanwhile, could you please attach a patch rather than a whole while? Patches are much more convenient to handle

Thanks a lot


Olivier Chédru added a comment - 30/Jun/08 01:49 AM
Here is the patch.

Julien Ponge added a comment - 08/Jul/08 01:48 PM
Very good.

Can you also add some plain text as a comment that documents the changes from an end-user point of view? I'll commit the patch after that.


Olivier Chédru added a comment - 09/Jul/08 01:30 AM
In addition to <arg> elements, the <executefile> element also accepts <env> elements to set variables in the environment of the target process. This can be useful if this process requires some environment variables, such as its installation directory, to work properly.
An <env> element has the following syntax: <env>variable=value</env>. Note the value supports variable substitution, for example:
<env>MY_PRODUCT_HOME=$INSTALL_PATH</env>.

Julien Ponge added a comment - 07/Aug/08 05:07 AM
Merged with the documentation. Thanks Olivier!