Kaju self-updater talk (v.1.x)

I just posted v.1.0.1 to Kaju, the open-source project that lets you add self-updating to your app. You can find the latest here:

https://github.com/ktekinay/kaju/

The update is a minor bug fix detailed (more or less) in the included README file.

I’ll post updates here as I make them.

Thanks for this, Kem…I look forward to playing around with it!

[quote=157355:@Kem Tekinay]I just posted v.1.0.1 to Kaju, the open-source project that lets you add self-updating to your app. You can find the latest here:

https://github.com/ktekinay/kaju/

The update is a minor bug fix detailed (more or less) in the included README file.

I’ll post updates here as I make them.[/quote]
You are using a shell script, so I guess it cannot be used for sandboxed apps (distributed from one’s own website)?

I don’t know, actually. The script is written to and executed from the temp directory and the user must have write permission for the app’s parent. It shouldn’t work, for obvious reasons, but I haven’t tried.

I really appreciate the work you’ve put in, but I’d like to ask why you deviated from the standard Sparkle look? With no background image and no other versions to select the window looks funny and off centered.

I wasn’t aware there was a “standard” or I had deviated from it. :slight_smile:

I actually looked at the Sparkle window and used it as a template. I never considered anyone would use it without an image, and I’m certainly not going to do that, so there was no consideration given to that scenario.

If it helps, the only Sandbox safe way of updating that I could find way to use an Apple installer :frowning: Not the prettiest way of doing it.

You app downloads it to a temporary location and executes the installer, then quits itself. The Apple installer will automagically try to replace the application wherever it is.

I’ve had a couple of users who’ve said that it’s a little odd, but on the whole this process has worked.

It’s certainly an option for a future version.

Not like a standard standard, but like an unspoken standard, where clones and ports all had the same look. If I feel the need I can change the look myself, the joys of open source!

Like I said, you (and a couple others) put in a lot of work, and it’s wonderful :slight_smile:
Thank you.

I would love to have such open-source project available for the community - if only it would work with sandboxed apps as well!

For updating a sandboxed app, as Sam suggests, I am currently using an Apple Installer (generated by AppWrapper) plus Xojo code to check for updates and download them from my server, based on a article by Marc Zeedar:
http://great-white-software.com/rblibrary/index.php?main_page=product_info&cPath=4&products_id=46

This does inform the user about an available update and then he can accept to download it and launch the installer. For now I am not doing a silent update, but I plan to implement a helper app which can do everything in the background. It will check for updates, download and launch a hidden installer and then ask to relaunch the app after it has been updated.

Valdemar De Sousa showed how that basically works, at the MBS conference in Koblenz last year.
https://forum.xojo.com/12479-helper-apps-and-the-sandbox/p3#p97150

I tested the MBS Updater Kit as well, which is based on Sparkle, but setup and maintenance are cumbersome and it does not work with sandboxed apps.

My thinking is that Kaju can be adapted to recognize pkg files on the Mac too. (Right now, it expects the app to be within the zip file.) If detected, it can run the installer, then quit.

This is theoretical, of course.

Oliver, I haven’t tried Sparkle or the MBS Updater Kit, but I think you’ll find the Kaju setup and maintenance rather easy.

Good work and I put Kaju on my favorite list. Regarding sandboxed apps and updating them:
Well… still the best way is to put the app on MAS. The side-effect are 30%, review process and some restrictions… but all in all the user experience is preserved.

These side effects are actually causing some big named brands to drop the Mac App Store![quote=157654:@Kem Tekinay]My thinking is that Kaju can be adapted to recognize pkg files on the Mac too. (Right now, it expects the app to be within the zip file.) If detected, it can run the installer, then quit.

This is theoretical, of course.[/quote]
It’s really easy to do and another great advantage of using an installer package is that the application can check the code signature of the package, so you have some end user security.

Perhaps I can share some code with you if it would help.

[quote=157655:@Tomas Jakobs]Good work and I put Kaju on my favorite list. Regarding sandboxed apps and updating them:
Well… still the best way is to put the app on MAS. The side-effect are 30%, review process and some restrictions… but all in all the user experience is preserved.[/quote]

I very much like the App Store, because it brings in lo’ o’ dow. Sales that I would probably never have done on my web site, so I can live with the 30% cut and the tacky reviewers.

But yet, I do sales on my own sites, and I think the idea to have an autoupdate is a nice one. Adobe does a silent update, probably based on something similar to what Sam describes, but a lot of people simply download the installer where you want and let you run it. If Kaju supported installers, it could manage sandboxed apps.

[quote=157688:@Sam Rowlands]@Tomas Jakobs The side-effect are 30%, review process and some restrictions.
These side effects are actually causing some big named brands to drop the Mac App Store![/quote]

The big named brands may have a recognized image and advertising power that most of us will never have. That said, I wonder how many sales they probably miss by cutting themselves from the die hard App Store customers. Even the best known magazine still needs newsstands.

It is probably just as ill advised to drop the MAS than to send your web site visitors to the App Store instead of making the sale.

[quote=157688:@Sam Rowlands]@Tomas Jakobs The side-effect are 30%, review process and some restrictions.
These side effects are actually causing some big named brands to drop the Mac App Store![/quote]

Well but I do not have a big brand. And I only publish those apps, my customers already have paid for development. Of course I have to adjust them before, making them App Store ready, creating a website, make a product out of a project. But heck this is fun and it raises the quality -bar for other projects too.

I see the App Store as nice-to-have and it does back my expenses for the AppleDev Account and server hosting fees. I am in a very comfort position not to be dependend, of course I will get more revenue when the ppl are using paypal payment on my websites but on the other hand I never would reach the ppl without popularity and market penetration of the MAS.

I would recommend to move further MAS discussions into another thread.

ja sorry was not my intention to hijack this thread…

[quote=157688:@Sam Rowlands]It’s really easy to do and another great advantage of using an installer package is that the application can check the code signature of the package, so you have some end user security.

Perhaps I can share some code with you if it would help.[/quote]

Sure, that would be great.

BTW, Kaju does do validation of both the update information through RSA keys, and the downloaded zip file through a hash.

As for MAS, I recommend it highly, but Kaju is for versions that aren’t going on MAS. Also, MAS is for Mac only while Kaju will work on Windows and Linux too. If there is another solution that works identically on all three platforms, I don’t know about it.

I’ve only begun using Kaju, but I wholeheartedly agree. This is due in large part to the fact that you provided the admin app which greatly simplifies the creation and maintenance of the manifest file.

Several years ago, I implemented Sparkle updates on a Mac-only app. Compared to the hopes I made myself jump through with that, this is a snap.

One thing I’d love it to have, and will work on if time permits, is cross-platform admin authentication and permissions-elevation so that updates can be done without having to be logged in with an admin account.

Kudos to Kaju!

@Kem Tekinay thank you for making this project avail. for us all. I implemented in my main project which is used on Windows 7 and above and on OS X Mavericks and above. It works very well and is extrem easy to handle. Nice work. Thank you!

I have one strange “effect” while using the Updater on Windows 7. My ZIP on the Server is approx. 42MB. While downloading, the updater shows a full downloadbar right from the start. See here:

BTW: Can we make the Update Window multilanguage please? I do not use GitHub.