Ahmed
Ahmed

Reputation: 15069

Sparkle: Can sparkle launch a pkg installer instead of updating individual files?

I am new to cocoa programming. In relation to update the application after deployment I am considering sparkle. I know it can update individual files.

But if we have a full installer package (something.pkg) as an update instead of individual files. Since we will release an installer (.pkg) once we publish an update. Can it download and run the package so that the package handles the update installation ?

Upvotes: 2

Views: 860

Answers (1)

abarnert
abarnert

Reputation: 365975

Yes. It says right on the front page:

Sparkle can install .pkg files for more complicated products.

This is one of the "new in 1.5" features. There is no actual 1.5 release, and likely never will be; you either use the last beta 1.5b6, or (often better) you use the source off github.

The details aren't documented, but the short version is in Publishing an Update:

  • Archive your app. Either:
    • Put a a copy of your .app (with the same name as the version it’s replacing) in a .zip, .tar.gz, or .tar.bz2. If you distribute your .app in a .dmg, zip up the .dmg.
    • Create an Installer .pkg with the same name as your app and put that .pkg in one of the archive formats above.

If you want to do anything that doesn't quite fit the simple case, you need to look at the source.

If you want to specify a custom installer object, just use SUPackageInstaller instead of SUInstaller or SUPlainInstaller.

Otherwise, look at the code in SUInstaller to see what it does. Basically, it looks at the files it's downloaded and extracted, and uses SUPackageInstaller if it finds a .pkg (or .mpkg) file whose name (minus extensions) matches the app/bundle name.

Upvotes: 3

Related Questions