• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: POSIX equiv to [nsBundle mainBundle] bundlePath]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: POSIX equiv to [nsBundle mainBundle] bundlePath]
      • From: James Quick <email@hidden>
  • Prev by Date: antlr and c++ exception handling
  • Next by Date: Re: "current" selector as string
  • Previous by thread: POSIX equiv to [nsBundle mainBundle] bundlePath]
  • Next by thread: Re: POSIX equiv to [nsBundle mainBundle] bundlePath]
  • Index(es):
    • Date
    • Thread