Re: POSIX equiv to [nsBundle mainBundle] bundlePath]
Re: POSIX equiv to [nsBundle mainBundle] bundlePath]
- Subject: Re: POSIX equiv to [nsBundle mainBundle] bundlePath]
- From: "tobias ford..." <email@hidden>
- Date: Thu, 24 Jul 2003 18:11:00 -0500
that's true. argv[0] gives it relative to the cwd. this is going to
be a method in a library. using argv approach would require that I
have some sort of initialize method that I must then require the user
of the library to call very early in the program in an attempt to cache
the data before someone else changed the cwd. Design wise, this locks
me into something that is very similar in design to glut with it's
glutInit method. This just makes using the lib too tricky to use.
On Thursday, July 24, 2003, at 5:06PM, Chris Long wrote:
if you are running this from the shell your argv[0] will give you that
string
On Friday, July 25, 2003, at 05:29 AM, tobias ford... wrote:
I'm needing to find a way to get the path to where the actual
executable file resides using POSIX apis. For example:
foo is located at /usr/bin/foo
when I execute foo, I want it to print /usr/bin/foo no matter what
directory I'm in.
something that is equivalent to [nsBundle mainBundle] bundlePath]
any suggestions? please cc me directly.
thanks
-------------------
Tobias Ford...
email@hidden email@hidden
-------------------
Senior Software Engineer @ WolfPack Studios
www.wolfpackstudios.com www.shadowbane.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
-------------------
Tobias Ford...
email@hidden email@hidden
-------------------
Senior Software Engineer @ WolfPack Studios
www.wolfpackstudios.com www.shadowbane.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.