?
Solved

Mac Installer Pkg

Posted on 2009-07-01
9
Medium Priority
?
1,153 Views
Last Modified: 2013-11-25
Hi,

So I'm just starting working on Mac development, and I'm trying to write a simple app where basically you click on a .dmg or .pkg (basically any installer file) and the installer opens up then copies a directory of files to the user's desktop.  Is there an easy way to accomplish this in Xcode, or could someone point me in the right direction of relevant resources?

Thanks in advance.
0
Comment
Question by:infinitusagnitio
  • 5
  • 4
9 Comments
 
LVL 41

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 200 total points
ID: 24761157
OSX XCode includes a PackageMaker Application .. this creates PKG files which are script driven installers
http://www.osxgnu.org/info/osxpackages.html
0
 
LVL 41

Expert Comment

by:Eoin OSullivan
ID: 24762565
You can get a bit more information here
http://s.sudre.free.fr/Stuff/PackageMaker_Howto.html
and on the Apple Developer website
http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/packagemaker.1.html

You might also want to look at ICEBERG - an alternative tool
http://s.sudre.free.fr/Software/Iceberg.html


0
 
LVL 3

Author Comment

by:infinitusagnitio
ID: 24764008
Thanks man, I'll take a look at these and post back here! :)
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 3

Author Comment

by:infinitusagnitio
ID: 24778719
Hi,

So I looked at those links, but I seem to be running into a simple roadblock.  I have the .pkg file I created and it's installing files, but I can't get it to install those files to a dynamic user home directory (I guess packagemaker lacks that variable).  I've been reading around online, and it seems like the solution is to write the root folder of the pkg (we'll call it MyRoot) to something like /private/var/tmp, and then write a postflight perl script (or another kind?) to copy the files to the user's home directory.  

Is this a good approach, and if so what is the variable in perl for homefolder (username)?
0
 
LVL 41

Expert Comment

by:Eoin OSullivan
ID: 24779211
Sorry. But your question was about installers. If you want to get into the mechanics of the installation process then please open another EE question to address it specifically.

There are several ways to perform a user specific install. You may have seen installers that prompt you whether you want to install in a user folder or root folder. See installers for screensavers or system preference panes for examples
0
 
LVL 3

Accepted Solution

by:
infinitusagnitio earned 0 total points
ID: 24780518
The question was not only about installers, but about the installer process as well.  Just because I put it in this zone does not mean this is an installer only question.  There was no provided solution for the process part of the question, which is why I reiterated it in order to further clarify.  See my original question:

"the installer opens up then copies a directory of files to the user's desktop."

Nothing about that part in your solution.  For the other people out there with this question in the future, the solution response would have been "Check the box on the distribution part of packagemaker under the 'Configuration' tab that says: Install Destination: User's Home Directory.

Then when you add your contents, make sure you add them with the proper folder structure ie:

MyRoot --> Desktop --> MyProject

and it will install MyProject onto the desktop.  Not that hard of an answer.
0
 
LVL 41

Expert Comment

by:Eoin OSullivan
ID: 24780641
I'm delighted you answered the second question for yourself. I refer to your ORIGINAL question.
I pointed you at some "relevant resources" i.e. PackageMaker etc.
I am sorry if you feel hard-done-by but it is the weekend and I don't have time to explore the detail of the second part of your question. You seem to have resolved it in any case.
0
 
LVL 41

Expert Comment

by:Eoin OSullivan
ID: 24780658
I object to the close if there is a refund. Either close with partial points or close with no refund.
0
 
LVL 3

Author Comment

by:infinitusagnitio
ID: 24780980
I gave you partial points for your original answer.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question