Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Selectively Saving a variable
Selectively Saving a variable [message #1785431] Fri, 13 April 2018 17:14
David Coley is currently offline David ColeyFriend
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

Previous Topic:Filter by path pattern in Dynamic Working Sets
Next Topic:Issue with installer (64bit photon)
Goto Forum:
  


Current Time: Wed Sep 19 18:14:16 GMT 2018

Powered by FUDForum. Page generated in 0.01373 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top