PDA

View Full Version : Mac user level read/write problem


Phil Steinmeyer
05-05-2006, 10:31 AM
The Mac version of my game stores all it's data (images, music, etc), in a bundle, which, in turn is delivered as part of a DMG.

If I download the DMG and run the bundle (either from within the DMG, or pulling it out to the desktop), it works fine, whether I'm an admin or a non-admin user.

However, if, as admin, I copy the Bundle to my applications folder, then switch accounts to a non-admin user account, and try to run that Bundle, the game crashes. I'm about 95% sure it's crashing on an ordinary 'read' of some image data from the bundle (i.e. the very first image it tries to load).

And yet, for other games that I believe are using bundles (Zuma), that I install to my applications folder as admin, I can run them as a different, non-admin user without any problems.

I haven't had a chance to test this yet, but one person reported the same issue for any user account other than the one that first installed the game (i.e. a different admin account).

Any ideas?

Phil Steinmeyer
05-05-2006, 10:42 AM
I just confirmed - this is not an admin/non-admin issue. It's a case that any user other than the one who originally installed it can't read data.

Phil Steinmeyer
05-05-2006, 11:35 AM
It's definitely a read error.

This line:

int h=open("Graphics/LogoPart_Games.jpg", O_BINARY | O_RDONLY);

works when running as the user that created the bundle (or made a duplicate of it), fails otherwise (i.e. returns -1). Admin privileges seem to have no relation.

/Graphics is a directory within the bundle, and the jpg is a file therein.

Phil Steinmeyer
05-05-2006, 12:35 PM
And the answer is...

All the data files I was putting into the bundle only had read privileges for 'User' not for others. Right-click on a file, show properties, and you can find this info, and set the proper privileges...