Auto Updates [Was Re: External functions]

Chipp Walters chipp at chipp.com
Tue Feb 5 00:56:35 EST 2008


Hi Trevor,

As you probably know, I've been using my MagicCarpet auto-updating
architecture for all Altuit's commercial apps as well as clients apps.

It's been updated to also create portable apps as well, with the advantage
they can be run from any drive and from any location.

Here's how I break out the application architecture:

1) Splashscreen launcher app
2) Main stack
3) Plugin stacks (all other stacks)
4) Other files, externals and zip files

The splashscreen app does only very few things. This is so that I can reuse
this code for every project, without changing it-- and possibly introducing
a bug.

I have a configurator altPlugin which automates setting everything up. Then
I use MagicCarpet to upload any changes to the Main stack or the plugin
stacks. MagicCarpet takes care of automatically adding notes, updating
version numbers of the stacks as well as the server version files.

The Splashscreen app can be set to automatically check for updates, or a
menu item can be added to the Main stack to do the same. The Splashscreen
app ONLY checks for updates to itself (exe or bundle) and the Main stack. No
other checks are created. I have a MagicCarpet library, which is typically a
substack of the Main stack, and it is responsible for downloading all other
stacks, files and even .zip files (which it can automatically unzip on both
Mac and PC). This is also how external updates are downloaded as well.

Each plugin stack has a version number associated with it (a hidden field)
and an about screen displays ALL version numbers for all stacks and plugins.
This is how I typically have users check version numbers, as it can also
copy all the plugins/stacks/version numbers to the clipboard with a single
click.

Some apps, like ThoughtOffice have very interesting demands regarding
versioning. Some plugins are auto-updated, others are purchased and only if
registered are auto-updated. Some complex biz logic required, and a lot of
hair pulling.

I've found spending time building my own updating infrastructure has helped
significantly in program development for a number of reasons. First, it's
fast. Second, with over 30 apps already taking advantage of this
architecture, it's very easy now for me to debug. Also, it's a dream come
true for clients, as they can see an application develop in a realtime way,
which works *MOST* of the time;-)

And, I never have to worry about whether or not a standalone will build, as
the Splashscreen is always the same code (different logo screen).

HTH,

Chipp



More information about the use-livecode mailing list