Setting environment variables for external tools on Mac OS X
Posted: Wed Jul 02, 2014 2:11 am
I'm having problems getting an external tool, which works fine on Windows, to work on Mac OS X. The tool could not be simpler, setting the working directory to ${cfd}, and the command line to "p4 edit ${cfd}/${cfne}". In other words "p4 edit <full_path_to_file>".
This tool definition works fine on Windows, and works fine from my Terminal window on Mac OS X, but when I try to run it from within Oxygen on Mac OS X, I get the following error:
If I create an external tool to do a printenv, I get quite a difference between my environment in Terminal and in Oxygen. The Oxygen environment is quite sparse (limited PATH, minimal vars, etc.):
Searching on the forum turns up only a few tangentially related discussions, and nothing that contains a clear, current answer. The ideal answer would provide a way to replicate my standard environment within Oxygen. Alternatively, a way to use an e.g. .oxygen_profile file or something like that to set an Oxygen-specific environment would be cool. Least good would be something that forces me to modify the global system environment in order to get Oxygen to pick it up...though I would take it.
Help appreciated!
This tool definition works fine on Windows, and works fine from my Terminal window on Mac OS X, but when I try to run it from within Oxygen on Mac OS X, I get the following error:
The error basically means that the $P4PORT variable set in my .bashrc file (and included into .bash_profile) isn't being picked up.Started: p4 edit /Users/malderete/dev/malderete-ltm/doc/main/core/en/xmlsource/workbook/workbook_apex/apex_workbook.xml
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to perforce:1666 failed.
nodename nor servname provided, or not known
Process ended with exit code: 1
If I create an external tool to do a printenv, I get quite a difference between my environment in Terminal and in Oxygen. The Oxygen environment is quite sparse (limited PATH, minimal vars, etc.):
So, the question is, how do I set critical environment variables, like PATH, a variety of Perforce variables, and (for other tools I plan to set up) build settings?Started: printenv
PATH=/usr/bin:/bin:/usr/sbin:/sbin
TMPDIR=/var/folders/w1/sz49980x6sl0h04wkxgv7419h77wj5/T/
SHELL=/bin/bash
HOME=/Users/malderete
USER=malderete
LOGNAME=malderete
SSH_AUTH_SOCK=/tmp/launch-tcJZ6V/Listeners
Apple_PubSub_Socket_Render=/tmp/launch-t27Xjr/Render
__CF_USER_TEXT_ENCODING=0x6073F225:0:0
__CHECKFIX1436934=1
com.apple.java.jvmTask=BundledApp
JAVA_LIBRARY_PATH=/Applications/oxygenAuthor/Oxygen XML Author.app/Contents/Resources/Java:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources
com.apple.java.jvmMode=client
Process ended with exit code: 0
Searching on the forum turns up only a few tangentially related discussions, and nothing that contains a clear, current answer. The ideal answer would provide a way to replicate my standard environment within Oxygen. Alternatively, a way to use an e.g. .oxygen_profile file or something like that to set an Oxygen-specific environment would be cool. Least good would be something that forces me to modify the global system environment in order to get Oxygen to pick it up...though I would take it.

Help appreciated!