Jump to content

PackageMaker script for $USER


9 posts in this topic

Recommended Posts

Hi.

 

I can't seem to find a solution with this problem. I have made some packages with PackageMaker, but I can only get it working with this output directory: /gaest/library

 

What I need is a script that allows ALL users to extract it into their own library, like if my username was dasurfas, then it would put the files into /dasurfas/library

 

Any clue how?

 

Thanks

Link to comment
Share on other sites

Hi.

 

I can't seem to find a solution with this problem. I have made some packages with PackageMaker, but I can only get it working with this output directory: /gaest/library

 

What I need is a script that allows ALL users to extract it into their own library, like if my username was dasurfas, then it would put the files into /dasurfas/library

 

Any clue how?

 

Thanks

 

PackageMaker was designed to NEVER enter the users directory because Apple does not want you installing apps for 1 user only.

 

What you have to do is write a Postflight shell script to copy your files from your resource folder inside the package to the proper place in the user's home folder.

 

I'll look around and see if I can't get you an example. I do know that you write the path like so: "/Users/$USER/Library/Preferences/Pref.plist" so you don't have to know the user's short username.

 

=)

Link to comment
Share on other sites

Is there a link to the walkthrough? I can't seem to find it, but then again.. I might be a bit slow :graduated:

 

Oh duh, I am such a retard. I never pasted it in...

 

Ok, here's a general tutorial:

http://developer.apple.com/documentation/D...ng_package.html

 

And here's a bit more specifics on scripts, with examples:

http://developer.apple.com/documentation/D...0001945-TPXREF8

 

Not sure why they echo everything. I never do.

 

=)

Link to comment
Share on other sites

 Share

×
×
  • Create New...