Typical data folder packaging not working

So in my normal apps, I package up the data folder by adding this to the Run Script dropdown:

cp -r bin/data "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources";

…and then adding the following code in the app somewhere early:


This has always worked for me, until my most recent application. This one uses a bunch of addons I haven’t used before, and also is my first app built within 009. Here’s what I’m noticing:

  1. Contents of the data folder are copied into the app’s Contents/Resources/data/ folder fine.
  2. Trying to load things from that data folder does not work.
  3. When I use a command to output the location of the data folder after I’ve set it, it tells me it has indeed changed to ../Resources/data/ but does not give the full path.
  4. Using system("pwd;"); to see what folder we’re in, I see that OF is running out of the data folder (i.e. shell scripts run are being run out of apps/myApps/emptyExample/bin/data. In other apps, I can see that they are being run out of /bin/emptyExample.app/Contents/MacOS i.e. within the app bundle, I’m pretty sure)
  5. This occurs even if I put system("pwd;"); in main, or if I put it after ofSetDataPathRoot("../Resources/data/");
  6. If I make up a folder structure that is /bin/Resources/data (i.e. where ../Resources/data/ would put you), and put something in there and try to load it from the data folder, it loads fine
  7. I tried putting a cd in the Run Scripts dropdown at the end, but it didn’t change anything

What’s going on here? What controls which folder everything is run out of? Any advice?

EDIT: Here are the addons I am using, and also the GLUT preferences (saw in another thread about “Use Current Working Directory” but it appears to already be disabled)