Solved

Mac Installer Pkg

Posted on 2009-07-01
9
1,104 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 39

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 50 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 39

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
 
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 39

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 39

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 39

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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 and use conditional statements in the C programming language.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now