On 29/10/09 22:10, JiHO wrote:
3rd reply to the same thread. Sorry, I am catching up on a ton of email...
Glad to have your input!
My current MacPorts prefix is '/Volumes/blue/mp'. '/opt/local' doesn't exist on my system.
That reminds me of another issue we have with the way we currently add items to the PATH. Right now, we are (well, I am, since I coded that part) brutal and stupid: just add "common" locations to the PATH and do not even try to deal with user-specific configuration.
In you case that could mean that, even though you probably configured your shell to use /Volumes/blue/tmp, Inkscape does not know about it. I suspect (but would welcome confirmation) that if you set the PATH in environment.plist: http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPRun... it should work. As far as I know, this is the standard way of setting environment variables for GUI apps on OS X.
No, I don't use 'environment.plist' - I don't like it because it is static and absolute (i.e. you can't append to system variables like $PATH and you need to logout/login again to get any changes picked up by the applications started by launchd). Even Apple says "The answer to your next question is: Yes, this is a relic left over from OpenStep/NextStep." http://developer.apple.com/mac/library/qa/qa2001/qa1067.html
<...>
So to sum up, if setting stuff in environment.plsit works for Inkscape, I would be for writing a FAQ about setting PATH in environment.plist and remove our PATH stuff from the bin/inkscape script. Removing it will cause people to ask about what changed and this should diffuse knowledge of environment.plist.
I would not recommend the use of 'environment.plist'.
Then, if someone comes with a clever way of extracting the PATH modifications from the shell configuration file of the user, that would be a plus, and would make things more transparent. However, this is no easy task: BASH alone has many possible user level config files (.profile, .bashrc, .bash_profile and there might be others). And then there are the csh, ksh aficionados ;)
I have been running your Inkscape development snapshots and later my own SVN builds with custom shell launcher scripts (script, openDoc and bin/inkscape), and have my normal shell environment (set with ~/.profile - a symbolic link to ~/.bash_profile - and ~/.bashrc) in Inkscape available by using a login shell in the first level (script and openDoc) which automatically sources the default startup files of my $SHELL (whatever that might be). See bug #383456 “[OS X] launch Inkscape with a login shell” https://bugs.launchpad.net/inkscape/+bug/383456 where I filed my initial ideas. That report is quite old and I have learned a lot since, but basically the attached patch is what gets the user configuration into the shell launcher script for inkscape-bin.
Please let me know what you think,
If this is something you might consider I could attach my current launch scripts to bug #383456 (status 'work-in-progress': additionally they log all inkscape console output into a separate file, add a time stamp, PID and list some env variables plus any arguments to inkscape-bin e.g. when called by a python extension script - mainly debugging info not of interest for the regular Inkscape user). I am sure using a login shell ('#!/bin/bash --login' or '#!/bin/sh -l') is debatable - OTOH X11/Xquartz does it as well as e.g. MacVim and probably other (ported) applications I don't know about.
~suv