Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 30, 2016 Configuring of dub for the application reading enviroment variable | ||||
---|---|---|---|---|
| ||||
My STARTING application shall read the enviroment variable. For example MY_VARIABLE= "I'm Gena". The MY_VARIABLE variable needs to be set in dub.json so what she would be visible in case of start of my application. Purpose: to set LD_LIBRARY_PATH having specified a certain directory in dub packet. Please, write an example of dub.json for it. |
October 01, 2016 Re: Configuring of dub for the application reading enviroment variable | ||||
---|---|---|---|---|
| ||||
Posted in reply to MGW | On 30/09/2016 11:31 PM, MGW wrote:
> My STARTING application shall read the enviroment variable.
> For example MY_VARIABLE= "I'm Gena".
> The MY_VARIABLE variable needs to be set in dub.json so
> what she would be visible in case of start of my application.
> Purpose: to set LD_LIBRARY_PATH having specified a certain directory in
> dub packet.
>
> Please, write an example of dub.json for it.
There is no way to do this.
|
September 30, 2016 Re: Configuring of dub for the application reading enviroment variable | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | On Friday, 30 September 2016 at 11:09:37 UTC, rikki cattermole wrote:
> There is no way to do this.
it is necessary to add section to dub:
"enviroment": [
{ "LD_LIBRARY_PATH", "$PACKAGE_DIR" },
{ "MY_VARIABLE", "$PACKAGE_DIR/IMAGES"}
]
|
September 30, 2016 Re: Configuring of dub for the application reading enviroment variable | ||||
---|---|---|---|---|
| ||||
Posted in reply to MGW | On Friday, 30 September 2016 at 10:31:52 UTC, MGW wrote:
> My STARTING application shall read the enviroment variable.
> For example MY_VARIABLE= "I'm Gena".
> The MY_VARIABLE variable needs to be set in dub.json so
> what she would be visible in case of start of my application.
> Purpose: to set LD_LIBRARY_PATH having specified a certain directory in dub packet.
>
> Please, write an example of dub.json for it.
Can you use preBuildCommands, e.g.:
"preBuildCommands" : ["export LD_LIBRARY_PATH=dir"]
|
Copyright © 1999-2021 by the D Language Foundation