Re: Install folder in users Documents
Re: Install folder in users Documents
- Subject: Re: Install folder in users Documents
- From: Harry Haddon <email@hidden>
- Date: Thu, 9 Dec 2010 10:38:22 -0500
Seconding what Greg said, I would add that Apple's guidelines encourage the installation of application specific files to Library/Application Support/<your app name>. If the folder is to be shared by all users, you can put your folder in the root Library folder, /Library/Application Support. This is where for example GarageBand puts its demo songs. If the installed folder is not to be shared, the folder could be installed in ~/Library/Application Support.
Harry (who dislikes installers that put stuff in my Documents folder)
On Dec 8, 2010, at 4:30 PM, Greg Neagle wrote:
> Re-think your installer and your application.
>
> Which user's Documents folder should you install this folder into? The user currently running the installer? What if this user is one of several users on the machine? What if the installer is being run as part of an automated install process, and there is no logged in user?
>
> Fine, you say. I'll just write a postflight script that iterates through /Users/* and adds it to all the /Users/*/Documents/ folders.
>
> But then -- what about users that are created _after_ the software is installed? What about users that have FileVault-protected home directories? What about network or external users, whose home directories are not under /Users/?
>
> During installation is the _wrong_ place and time for this task, as you are making assumptions which may not be true.
>
> If this folder is truly needed, then it's best to have a copy of the default contents somewhere in the application's resources, and on first launch of the app for a given user, copy the folder into the right place.
>
> If you are not the developer of the software or cannot change this aspect of it, then you should create a user-level LaunchAgent that does the copying for you, and install that in /Library/LaunchAgents. Upon login, the LaunchAgent runs and can see if the folder exists for the user, and if not, it can copy it into place.
>
> -Greg
>
> On Dec 8, 2010, at 12:08 PM, email@hidden wrote:
>
>> How do I get a folder installed into the users documents folder?
>>
>> currently I have /Documents as the destination but this make a documents folder at the startup drive root.
>>
>> ?
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Installer-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Installer-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden