Skip to main content



      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 10:00 Go to next message
Eclipse UserFriend
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 10:58 Go to previous messageGo to next message
Eclipse UserFriend
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 12:09 Go to previous messageGo to next message
Eclipse UserFriend
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 12:38 Go to previous messageGo to next message
Eclipse UserFriend
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 15:35 Go to previous messageGo to next message
Eclipse UserFriend
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 09: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 09:40 Go to previous message
Eclipse UserFriend
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 May 18 23:06:56 EDT 2025

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

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

Back to the top