Best method to package app with dependant packages

Drekko
New Contributor

Hello guys
I am wondering if anyone could point me in the right direction on how to package an app in composer to upload to Casper admin with the package requiring 2 dependant packages prior

Is creating a snapshot the best way?
I am learning this stuff as I go really probably a trivial question

3 REPLIES 3

roiegat
Contributor III

There are several methods of doing it. The easiest would be to take a snapshot of the machine before the installs and then after. Then cleanup the junk (save application state folder...) and package it. If it doesn't fill the user folders go via package, otherwise go via DMG.

Personally, what I like to do is this: 1) Take all the installer packages and put them in /tmp folder.
2) Open Composer and create a package with those packages in the /tmp folder. This will drop those packages on the users machine.
3) Write a post-install script that would install each package in the order you want. I usually add some sort of check after each pacakge to ensure it was done and also some logging as well.

Keep in mind this will only work with no user folder filled information since DMG don't let you run post-install scripts (at least that I'm aware of).

Good luck!

bpavlov
Honored Contributor

Maybe someone else will respond to this with more details, but simply put: no, snapshots are not the best way to do package up software. And DMGs packages should be avoided; try to create a pkg because its an apple standard that will work with or without Casper.

Typically speaking you should try to use the vendor provided package as is. If it doesn't work then you should open it up and analyze what it's doing (well really you should analyze the package regardless to make sure you know what it's doing). A tool like Suspicious Package can be helpful in analyzing a package.

Drekko
New Contributor

ok ill look into it
What I did do already though before your replies. I created a snapshot, installed the pkg's
I then built the 3 PKGs into one, using composer > Build as PKG saved it to local desktop

Removed the application and the 2 dependant PKGs and installed it to test, seemed to work ok..

It didnt put anything in the user directory though