Hi all,
Here's a simple live update program, you can download the project
here
Instructions:
Create a directory on your website called updates.
In this directory you put future downloads of the latest version of the update program itself and the .upd files for your applications. (myapp1.upd, myapp2.upd etc.)
For each application you create a subdir containing the files to be downloaded.
Incorporate the global_procedures_of_VZupdate.wdg in your program and in the project initialization code input the line:
check_update()
Open the project VZ_update.wdp and create the executable.
The file VZ_updateNN.exe should be in the same dir as your application's executable. (NN being the Windev version) So Include it in your first setup.
Create a textfile containing the files to be updated.
The filename is the name of your app + .upd
It contains the fileinfo separated by tabs:
Version: this is the version of your exe file
Date: this is the release date of the file
Filename: this is the file to be downloaded
Size: this is the filesize in bytes
example of the content of a .upd file:
02.54 tab 20091003 tab subdir_myappname/myprogram.exe tab 4879415
02.50 tab 20090621 tab subdir_myappname/myprogram.wdd tab 31577
02.14 tab 20090331 tab subdir_myappname/WD120ZIP.DLL tab 364544
Upload this file to your server.
Upload the files to be updated to the same relative location as indicated in the .upd file.
Put a textfile called VZupdateNN.upd containing the current version of VZ_updateNN.exe in the update directory of your website. (again: NN being the Windev version)
The VZ_update program uses the Windev framework of your application, so it should be the same Windev version. You create a VZ_update.exe for each Windev version of the deployed programs.
Of course you are free to rename all files to your liking.
If you have made improvements to this program please report them on the forum, so we can all benefit.
todo:
Create a Windev program to create and upload the .upd files and all files to be updated.
notes:
- the sIniName variable refers to an ini file in which the user's choice to enable live-update is stored. (e.g. if they don't have an internet connection)
- the testing of the program is not easy, because on testmode the circumstances are quite different from a running executable.
Best regards,
Piet
Edited 1 time(s). Last edit at 10/10/2009 12:16PM by Piet van Zanten.