Mac Installer Pkg

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.
LVL 3
infinitusagnitioAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
infinitusagnitioConnect With a Mentor Author Commented:
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
 
Eoin OSullivanConnect With a Mentor ConsultantCommented:
OSX XCode includes a PackageMaker Application .. this creates PKG files which are script driven installers
http://www.osxgnu.org/info/osxpackages.html
0
 
Eoin OSullivanConsultantCommented:
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
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
infinitusagnitioAuthor Commented:
Thanks man, I'll take a look at these and post back here! :)
0
 
infinitusagnitioAuthor Commented:
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
 
Eoin OSullivanConsultantCommented:
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
 
Eoin OSullivanConsultantCommented:
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
 
Eoin OSullivanConsultantCommented:
I object to the close if there is a refund. Either close with partial points or close with no refund.
0
 
infinitusagnitioAuthor Commented:
I gave you partial points for your original answer.
0
All Courses

From novice to tech pro — start learning today.