Custom engine: passing environment variables

Hi, I try to add a custom XQuery engine that relies on a shell script to be launched. This script in turn does expect one environment variable to be set. Unfirtunately, this variable does not seem to be set. I tried to set it in /etc/launchd.conf and in oxygenMac.sh, with no success. I use Mac OS X Snow Leopard, with oXygen 11.1, and I use Spotlight to launch oXygen. Did I miss something? Regards, -- Florent Georges http://www.fgeorges.org/

Hello, It should work. Make sure that you 'export' the environment variable in oxygenMac.sh. Also, Oxygen.app is not affected by the modifications in the oxygenMac.sh So make sure you are running Oxygen with oxygenMac.sh(in the command line). To make sure the environment variable is passed through you can create an external tool(Tols -> External Tools -> Preferences), and in its command line write: echo ${env(ENVIRONMENT_VARIABLE_NAME)} This should allow you to test right away if the variable is set in Oxygen. Let me know if you need further help. Regards, Adrian Buza --------------------- Oxygen XML Editor Florent Georges wrote:
Hi,
I try to add a custom XQuery engine that relies on a shell script to be launched. This script in turn does expect one environment variable to be set. Unfirtunately, this variable does not seem to be set. I tried to set it in /etc/launchd.conf and in oxygenMac.sh, with no success.
I use Mac OS X Snow Leopard, with oXygen 11.1, and I use Spotlight to launch oXygen. Did I miss something?
Regards,

Adrian Buza wrote: Hi,
So make sure you are running Oxygen with oxygenMac.sh(in the command line).
That was the problem, I use Spotlight. So I can use a terminal, but Spotlight is really convenient. Is there any way to set environment variables that are visible in oXygen.app? Regards, -- Florent Georges http://www.fgeorges.org/

Hi, You can do the same for Oxygen.app. Right click on the app and select "Show contents", navigate to Content and edit the Info.plist. The best tool to edit it is the Property List Editor but any XML or text editor will do. You have to add inside the last dict element: <key>LSEnvironment</key> <dict> <key>ENVIRONMENT_VARIABLE</key> <string>VALUE</string> </dict> Regards, Adrian Florent Georges wrote:
Adrian Buza wrote:
Hi,
So make sure you are running Oxygen with oxygenMac.sh(in the command line).
That was the problem, I use Spotlight. So I can use a terminal, but Spotlight is really convenient. Is there any way to set environment variables that are visible in oXygen.app?
Regards,

Adrian Buza wrote:
You can do the same for Oxygen.app. Right click on the app and select "Show contents", navigate to Content and edit the Info.plist.
Perfect, thank you! -- Florent Georges http://www.fgeorges.org/
participants (2)
-
Adrian Buza
-
Florent Georges