Re: Install into User's Home directory
Re: Install into User's Home directory
- Subject: Re: Install into User's Home directory
- From: Stéphane Sudre <email@hidden>
- Date: Tue, 27 Dec 2005 21:16:03 +0100
On mardi, décembre 27, 2005, at 07:19 PM, Patrick Litterst wrote:
I need to install a folder of files into the user's Home directory.
There doesn't seem to be a way to do this without writing a script. Am
I correct about this?
Almost. From the list archive:
Juts found a solution to install files/folders in $HOME with a .pkg if:
- you only install files/folder in $HOME
and you don't want:
- any user interaction (as in: the user has to select his/her home
folder)
I thought it might be interesting to share this solution.
--------8<-----------8<-----------
Launch PackageMaker or any other tool that can create .pkg:
1) Create a package with the following flags set:
o Root Volume Only
o Follow Flags
o Overwrite directory permissions (Off or On) (I tried it with On).
2) Create your file hierarchy on disk or in the other tool like this:
The folder /private/tmp/A_SUPER_UNIQUE_NAME_YOU_SELECTED/ will be the
default location for the installation
Then create the Library, Pictures, Movies, etc... folder as you wish.
I set the file owner and group to root:admin for the files/folder
within A_SUPER_UNIQUE_NAME_YOU_SELECTED. The final files are
current_user_id:20 after installation on my 10.2.8 machine.
3) Create the following pretty complex preflight script:
#!/bin/sh
ln -s $HOME /private/tmp/A_SUPER_UNIQUE_NAME_YOU_SELECTED
exit 0
4) Build your package with either Command + K or Command +B depending
on the tool.
5) Run (and test?)
I am currently attempting to achieve this with a script. I have made
an installer that installs the folder of files on the user's hard
drive and then uses the following simple postflight script to move the
files to the proper directory inside user's Home directory. The > script:
#!/bin/sh
mv /InstalledFiles ${HOME}/directory
exit 0
When I build and run the installer, the installer says it cannot run
this script. However, if I run the script from the Terminal, the
script executes properly. Is there something wrong with the Script?
Should I install into the user's Home directory via some other way?
It may depend on what $HOME is pointing to.
_______________________________________________
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