Automatically updating a stack - How Do I Do It?
Len Morgan
len-morgan at crcom.net
Sun Apr 8 22:30:25 EDT 2007
As I'm getting my app finished up, I've come up with a question about
how exactly to update a stack from a server. The software will be
loaded on a workstation initially and stackRunner will get the process
going.
I'd like the app to check for newer versions on my server at startup.
I've stored a custom property in each stack that has a version and a
build number but it occurs to me that I can't get that information until
I "start using" the stack. Once that's done, if I find (through a
onPreOpenStack handler) that the server has a newer version, how can I
download the newer version? Will I have to notify the user that a new
version has been downloaded and require them to restart? Can I change a
running stack (reload the updated version without reloading the OS
cached version).
Is there a better way to handle this before the stacks are ever opened
(like encoding the version/build number into the filename of the stack?
Should I just notify the user that there is a new version available and
have them push a button to download it, then restart the program? I'd
like to notify the user that a new version is being downloaded but don't
want to require much more from them if at all possible.
Note that my app is spread across several stacks and I want this update
ability in all of them but not have to download the entire set of stacks
if only one of them has changed if I can avoid it.
If there is a tutorial available that already explains this, please
point me to it.
Thanks!!
Len Morgan
More information about the use-livecode
mailing list