Auto update for application via internet?

Hi Experts,

I am using Delphi 7 and need the following.

1. An auto update process (process explained) and code (accompany the process) examples of how to update my software online as bugs or changes occurs. Please help me to design the perfect system on both sides:
a) Creating updates and uploading them as well as
b) on the user's application side to detect and install new updates.

2. My application consists of 2 apps and therefore the main application must check for both updates.
3. How can I only create patches of the exe? Create and Apply them again?
4. My main application should restart automatically after an update has been completed.

BTW: I do have Clever Internet Suite.
I also have a very simple process currently that is working 95% of time but sometimes have problems.

Marius0188Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
TheRealLokiConnect With a Mentor Senior DeveloperCommented:
just a thought, 1 real easy way is to just use an ftp server. ignore the rest if this is not an option :-)

you don't need to write the server, just the client
the server holds all the patches, which are either in different subdirectories, or have different filenames
but there is also a "upgrades.ini" file

your ftp client connects, and downloads the "upgrades.ini" file
the client application looks up it's version in the ini file and can see what file it needs to download next

the ini file may look like this :-

[Project1.exe]
Version1.0 Filename=Project1_install.exe
Version2.0 Filename=Project1_PatchToV2.0.exe
Version3.0 Filename=Project1_PatchToV3.0.exe

Version1.0 Next=Version2.0
Version2.0 Next=Version3.0
Version3.0 Next=
; next is blank because this is the last version
----
so, the process may go something like this :-
(myversion = 'Version1.0')
var
    sl: tstringlist;
    tempversion: string;
begin
    sl := tstringlist.create;
    try
        ftp connect
        ftp get  upgrades.ini
        tempversion := myversion;
        with TiniFile.create(extractfilepath(paramstr(0)) + 'upgrades.ini') do
        try
             tempversion := ReadString('Project1.exe', tempversion, '');
             while tempversion <> '' do
             begin
                 sl.add(ReadString('Project1.exe', tempversion + ' Next', '');  // add this file to the list of files we need to download
                 tempversion := ReadString('Project1.exe', tempversion, ''); // check for the next patch
             end;
        finally
            free; // ini file
        end;
// now download the list
        for i := 0 to pred(sl.count) do
            ftp get sl[i]
// if we have some patches, then make a batch file to run the installs
        if sl.count > 0 then
        begin
            sl.insert(0, 'ping 0.0.0.1 -n 1 -w 10000 >NUL'); // just add a 10 second pause to the batch file we are making
// now run the patches in sequence
            sl.savetofile(extractFilePath(paramstr(0)) + 'upgrademe.bat');
        end;  
    finally
        sl.clear;
        sl.free;
    end;
          // run the batch file with createprocess or winexec then close the application - you have 10 seconds...
end;
0
 
TheRealLokiSenior DeveloperCommented:
does it _need_ to be in "Clever Internet Suite" or can it be 1 of the other already installed sets (sockets, indy) ?
0
 
Marius0188Author Commented:
Preferably Clever Internet Suite.
I worked with Indy alot but IMHO it's really not getting close to ICS.

But if you have a process and example I can convert it to ICS. Maybe.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
TheRealLokiSenior DeveloperCommented:
I know there is a set of free ones at http://www.torry.net/pages.php?id=291
take a look at those. look for "FWS" for "free with source"
however, I have my own using native sockets (which is pretty similar to ICS)

There are a couple of methods.
If you are version 1 and want to go to version3
you can have it install version2, then version 3,
or you can have a version 3 complete install, so you can run it over any prior version
The latter is worse imho, becuase you need to make it backwards compatibe for many versions in case config file structures change etc.

You can make a "patch" filen which is the binary "difference" between project1.exe (version1) and project1.exe (version2)
which means you need to run each patch in sequence, usually accompanied by a setup to convert config ftile structures add settings etc. in case they have changed.
0
 
Marius0188Author Commented:
I am not interested in the latter method.

Ideally the user should just run the latest update and it should update to the latest version irrespective of
what current version he got.
0
 
JeePeeTeeConnect With a Mentor Commented:
Can this be of any help? See #3 in the list on the followin link: http://www.appcontrols.com/components.html 
0
All Courses

From novice to tech pro — start learning today.