Starting Directory...
For an engine I am making, I am using SDL. I know that SDL sets the starting directory to the .app's parent, and I have gone along with this for a while. An issue arises when I want to move the data into the Resource folder in the bundle, I can tell that SDLMain.c chdirs to change this, but commenting that out doesn't bring the start path to Resources.
I used GLFW when my idea of Resources being the starting path formed, I don't know if that does any automagic.
But my question is, what is the true starting directory for the different ways that an executable may be opened? Searching Apple's developer site doesn't seem to reveal much regarding this.
I used GLFW when my idea of Resources being the starting path formed, I don't know if that does any automagic.
But my question is, what is the true starting directory for the different ways that an executable may be opened? Searching Apple's developer site doesn't seem to reveal much regarding this.
OneSadCookie has (or at least had) a webpage that answers that very question - you can probably find a link if you hunt around the forums.
I wouldn't worry about it though. It is easy enough to get the path to the Resources folder from NSBundle ( [[NSBundle mainBundle] resourcePath] ) and set that to be your working directory at launch time.
I wouldn't worry about it though. It is easy enough to get the path to the Resources folder from NSBundle ( [[NSBundle mainBundle] resourcePath] ) and set that to be your working directory at launch time.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Copy directory | madjerry | 8 | 4,010 |
Jun 27, 2008 11:12 AM Last Post: ThemsAllTook |
|

