[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: best way to launch (a series) of other (non gnustep) programs
From: |
Dirk Olmes |
Subject: |
Re: best way to launch (a series) of other (non gnustep) programs |
Date: |
Mon, 05 Jul 2004 06:03:29 +0200 |
On 2004-07-04 16:26:47 +0200 Chad Hardin <cehardin@mac.com> wrote:
Well, if you think about it, depending on something like $PATH is itself
non-portable! Sure, we have grown accustomed to things like a $PATH variable
in the environment, but who's to say it must exist? For example, you're
assuming that something like gv will exist, that itself is very non-portable.
Really, $PATH i something used by shells, not really the OS, this goes for
all the normal "shell" type stuff environment variables you may be thinking
of. Just something to chew on.
[...]
I suppose you could write a method like this to search for a UNIX program in
$PATH:
-(NSString*) findProgram: (NSString*) programName
Chad is right, path does not even have to be set. But I've implemented
searching $PATH in Zipper and found it works quite well :-)
You may also consider providing a preference setting for the path to the
executable to launch. While it has to be done manually, the user is free to
organize his/her filesystem.
-dirk