Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mac Installer Pkg

Posted on 2009-07-01
9
Medium Priority
?
1,138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 40

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 40

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 40

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 40

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 40

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

Technology Partners: 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!

Question has a verified solution.

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

Preface   In the first 100 days of the Macintosh release in January 1984, Apple sold 72,000 of the computers. Relatively cheap, easy-to-use personal computer with a graphical operating system. I've never seen this model. I did see this one:   …
CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
The goal of this video is to provide viewers with basic examples to understand and use structures 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.

661 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