Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Mac Installer Pkg

Posted on 2009-07-01
9
Medium Priority
?
1,142 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

772 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