Selectively Saving a variable [message #1785431] |
Fri, 13 April 2018 17:14 |
David Coley Messages: 37 Registered: July 2012 |
Member |
|
|
[EDIT: Figured this out in an ugly way]
Issue was we had some settings that had to be placed during FIRST RUN ONLY and could not be changed automatically later due to audit restrictions.
I couldn't figure it out until I though of the old "If $flag" hack used in some programming languages.
The run sets a "first.run" variable into the eclipse.ini file and this way it works
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="[url]http://www.omg.org/XMI[/url]"
xmlns:xsi="[url]http://www.w3.org/2001/XMLSchema-instance[/url]"
xmlns:setup="[url]http://www.eclipse.org/oomph/setup/1.0[/url]">
<setup:CompoundTask
filter="(first.install.ran=true)"
name="First Run Done"/>
<setup:CompoundTask
filter="(!(first.install.ran=*))"
name="First Run Not Done">
<setupTask
xsi:type="setup:VariableTask"
name="loc.code"
value="${install.root|uri}/${env.loccode}"
storageURI="[url]scope://Installation[/url]"
label=""/>
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Dloc.code"
value="=${loc.code}"
vm="true"/>
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Dfirst.install.ran"
value="=true"
vm="true"/>
</setup:CompoundTask>
<setup:VariableTask
name="loc.code"
value="${install.root|uri}/${loc.code}"
storageURI="[url]scope://Installation[/url]"
label=""/>
<setup:EclipseIniTask
option="-Dloc.code"
value="=${loc.code}"
vm="true"/>
<setup:EclipseIniTask
option="-Dfirst.install.ran"
value="=true"
vm="true"/>
</xmi:XMI>
[Updated on: Fri, 13 April 2018 17:35] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02440 seconds