On Dec 21, 2005, at 3:05 PM, Tom Meinen wrote:
My prime directive for the software I write has always
been this: Leave everything on the user's system other
than my app the #$%^ alone (a task that is difficult
when using VB). The Windows registry is something
I've kept my hands off, even though it's easy to write
to for saving the user's chosen options. Instead,
I've always saved such options to a text file named
"options.dat."
So far, so good.
My system worked fine until someone installed one of
my programs while logged in under the administrator's
account and then logged off and back in under a
limited account and tried to run the program.
Also sounds wise to me.
<snip>
My questions are about how to port this system to the
Mac version of my app:
1. I understand Mac apps don't typically use a setup
program that puts the app into a sub-folder under the
folder "Program Files" as is done in Windows.
Instead, the user simply drags the executable onto the
desktop.
A better place is the Applications folder.
If the user is an administrator, and wants the app to be available to
all users of the machine, then he/she would use /Applications.
If the user has only restricted access, they could use their own /
Users/[home]/Applications folder, in which case that one user only
normally would have access to the program.
The useroptions.dat file in my programs has
always been kept in the same folder as the executable,
and need never be seen or touched by the user.
A better place under OS X is /Users/[home]/Library/Preferences/[your
app name]
If you are setting up with an admin account, you could set defaults
in /Library/Preferences in a similar manner.
Another spot favored for some purposes is Library/Application Support.
Mac OS X applications folders are often "Packages", it is unwise to
tamper with the contents as a rule.
But I don't want to clutter up a simple response. Much to learn.
<snip>
2. Are there user account/file permission issues in OS
X similar to the Win XP/2K issues I've described? Do
I need to use some kind of call to the Mac API in
order to create the separate options files such as
Jay_options.dat, Lisa_options.dat, etc?
Yes, permissions are alive and well, and a VERY good idea.
Much can be found in the archives about storing user preferences.
Plain text files will do well for a start.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>