Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Is it possible to use environmental variables in oomph?
Is it possible to use environmental variables in oomph? [message #1700294] Wed, 01 July 2015 14:00 Go to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
Is it possible to use environmental varibles in oomph? Can you give me an example of the usage?
Re: Is it possible to use environmental variables in oomph? [message #1700302 is a reply to message #1700294] Wed, 01 July 2015 14:58 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 01.07.2015 um 16:00 schrieb Aleksandar Toshovski:
> Is it possible to use environmental varibles in oomph? Can you give me an example of the usage?
It's all explained in http://wiki.eclipse.org/Eclipse_Oomph_Authoring#Declaring_and_Using_Variables

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Is it possible to use environmental variables in oomph? [message #1700304 is a reply to message #1700302] Wed, 01 July 2015 16:09 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
Maybe I don't understand/find the part with the system variables. I tried to use System.getenv("HOMEDIR"), like this:

<setupTask
xsi:type="setup:VariableTask"
name="HOMESRC"
value="System.getenv(&quot;HOMESRC&quot;)"
label="HOME SRC"/>
<stream name="master">

Also I tried to use just $HOMESRC, but they are not interpreted. Is it the right task and semantic?
Re: Is it possible to use environmental variables in oomph? [message #1700307 is a reply to message #1700304] Wed, 01 July 2015 16:38 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 01.07.2015 um 18:09 schrieb Aleksandar Toshovski:
> Maybe I don't understand/find the part with the system variables. I tried to use System.getenv("HOMEDIR"), like this:
>
> <setupTask
> xsi:type="setup:VariableTask"
> name="HOMESRC"
> value="System.getenv("HOMESRC")"
> label="HOME SRC"/>
> <stream name="master">
>
> Also I tried to use just $HOMESRC, but they are not interpreted. Is it the right task and semantic?
You don't need to decalre a VariableTask for variables that are already declared in your system environment. Just refer
to it via ${HOMESRC} wherever in your setup model you want to use it.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Is it possible to use environmental variables in oomph? [message #1700322 is a reply to message #1700307] Wed, 01 July 2015 19:35 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
Thank you for your response
Re: Is it possible to use environmental variables in oomph? [message #1831832 is a reply to message #1700322] Mon, 31 August 2020 13:23 Go to previous messageGo to next message
Eclipse UserFriend
Is there a chance to have an environment variable unresolved during installation process?
I tried to create a file which should contain an environment variable like ${HOME}, but I need the newly created file to contain ${HOME} instead of "/home/me".
During the installation process the environment variable gets replaced by its value and thus the created file has an incorrect content. Is is possible to avoid the replacement?
The environment variable I need will be set dynamically by another tool, but it might be set to and old value at the time of the installation.
Re: Is it possible to use environmental variables in oomph? [message #1831833 is a reply to message #1831832] Mon, 31 August 2020 13:40 Go to previous message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
The same link as provided above by Eike contains the following:
Quote:
To prevent a variable reference from being expanded (e.g. you actually want to have the value '${var}' and not the value of "var"), you need to escape the variable syntax with an extra double dollar character. So "$${var}" will result in "${var}".


Previous Topic:Issues with ResourceCreationTask
Next Topic:Possibility to uninstall feature?
Goto Forum:
  


Current Time: Sun Nov 03 04:39:24 GMT 2024

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

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

Back to the top