Groups > Superbase > Superbase 3 programming > Re: Auto web update




Auto web update

Auto web update
Mon, 28 May 2007 20:01:06 +080
Anybody got any clues on how to get an app to update itself from the web?
I expect there are several steps
1. Check there is an internet connection
2. Check website is available
3. Check if update.exe is a later version
3. Download the update.exe
4. Close the running app to be updated
5. Run the update.exe
6. Optionally restart the app

Cheers, John 

Post Reply
Re: Auto web update
Tue, 29 May 2007 16:29:29 +010
John Roberts wrote:
> Anybody got any clues on how to get an app to update itself from the web?
> I expect there are several steps
> 1. Check there is an internet connection
> 2. Check website is available
> 3. Check if update.exe is a later version
> 3. Download the update.exe
> 4. Close the running app to be updated
> 5. Run the update.exe
> 6. Optionally restart the app

Sure, there are numerous approaches. You can store the filename and
version number of the latest version in a text file on the web server
and simply retrieve the file and then check if the version exceeds the
current running one. If it does, then retrieve the installer from the
listed URL. You can do this easily in SBL using the WININET stuff, or
else from SIMPOL using the httpclientlib.sml that will be in the next
release (looks like Thursday or Friday of this week - finally!). You
could also do what one customer did and simply create a client program
in SIMPOL and a server program in SIMPOL using the TCP/IP stuff and the
sample I provided and he wrote a mini ftp-type protocol to do remote
install and updating. All he needs to distribute now is the small
SIMPOL-based client program. It does the rest.

Post Reply
Re: Auto web update
Wed, 30 May 2007 12:13:05 +080
It would seem that doing it in SIMPOL would be the smart thing to do. I am 
interested in any info that may help in that regard.
Cheers, John

"Neil Robinson" <neil@simpol.com> wrote in message 
news:f3hgsq$ugq$1@ipx22096.ipxserver.de...
> John Roberts wrote:
>> Anybody got any clues on how to get an app to update itself from the
web?
>> I expect there are several steps
>> 1. Check there is an internet connection
>> 2. Check website is available
>> 3. Check if update.exe is a later version
>> 3. Download the update.exe
>> 4. Close the running app to be updated
>> 5. Run the update.exe
>> 6. Optionally restart the app
>
> Sure, there are numerous approaches. You can store the filename and
> version number of the latest version in a text file on the web server
> and simply retrieve the file and then check if the version exceeds the
> current running one. If it does, then retrieve the installer from the
> listed URL. You can do this easily in SBL using the WININET stuff, or
> else from SIMPOL using the httpclientlib.sml that will be in the next
> release (looks like Thursday or Friday of this week - finally!). You
> could also do what one customer did and simply create a client program
> in SIMPOL and a server program in SIMPOL using the TCP/IP stuff and the
> sample I provided and he wrote a mini ftp-type protocol to do remote
> install and updating. All he needs to distribute now is the small
> SIMPOL-based client program. It does the rest.
>
> Ciao, Neil 

Post Reply
Re: Auto web update
Thu, 31 May 2007 15:37:52 +010
John Roberts wrote:
> It would seem that doing it in SIMPOL would be the smart thing to do. I am

> interested in any info that may help in that regard.

You may want to spend some time with the sample in the \projects\sockets
directory with the client and server samples. They are a set. This is a
basic implementation that just has the client ask the server for a file
and the server sends its own *.smp file, but this can be vastly
enhanced. You could provide a list that the client can ask for, you can
send the files a chunk at a time compressed using .compress1() with a
header saying how big the compressed chunk is and then decompress it at
the client end, etc. etc.

Post Reply
about | contact