Hi,
I'm looking for some tips in order to create an app with a "check for update" function.
I've read I could use the "splash screen" method described here:
http://lessons.runrev.com/s/lessons/m/4 ... pplication
What I cannot find a way to get the version of the current standalone file and compare it to the file I saved on our LAN (I'm going to save the "Main Application file" there): is there a function or a property to use?
Thanks!
How to update a standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: How to update a standalone
Hi David,
are we talking about the version of the engine that standalone was built with?
If we are talking about separate stack files, then there are no functions etc.
you need to manage that by yourself!
Add a custom property to your stack(s) -> cVersion or whatever, then you can always check this property
and decide to download a newer version or not.
You can check any property of a CLOSED stack file by:
...
## Example:
## Get latest available version number from server
put url"http:///www.yourserver.com/newestversion.txt") into tNewerVersion
## Get version number of current stack on users hd
put specialfolderpath("documents") & "/myupdatablestack.livecode" into tCurrentStack
put the cVersion of stack tCurrenstack into tCurrentVersion
## IMPORTANT: To avoid having 2 stacks with the same name after updating (LC does NOT like that!)
close stack tCurrentStack
## Now do your comparison and act accordingly
if tNewerVersion > tCurrentVersion then
## download new stack and put it into users documents folder!
...
Best
Klaus
are we talking about the version of the engine that standalone was built with?
If we are talking about separate stack files, then there are no functions etc.
you need to manage that by yourself!

Add a custom property to your stack(s) -> cVersion or whatever, then you can always check this property
and decide to download a newer version or not.
You can check any property of a CLOSED stack file by:
...
## Example:
## Get latest available version number from server
put url"http:///www.yourserver.com/newestversion.txt") into tNewerVersion
## Get version number of current stack on users hd
put specialfolderpath("documents") & "/myupdatablestack.livecode" into tCurrentStack
put the cVersion of stack tCurrenstack into tCurrentVersion
## IMPORTANT: To avoid having 2 stacks with the same name after updating (LC does NOT like that!)
close stack tCurrentStack
## Now do your comparison and act accordingly

if tNewerVersion > tCurrentVersion then
## download new stack and put it into users documents folder!
...
Best
Klaus