Solved

Auto update for application via internet?

Posted on 2006-07-11
6
2,694 Views
Last Modified: 2012-05-05
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.

0
Comment
Question by:Marius0188
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17087105
does it _need_ to be in "Clever Internet Suite" or can it be 1 of the other already installed sets (sockets, indy) ?
0
 

Author Comment

by:Marius0188
ID: 17087139
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
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17087253
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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:Marius0188
ID: 17087309
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
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 150 total points
ID: 17087359
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
 
LVL 4

Assisted Solution

by:JeePeeTee
JeePeeTee earned 100 total points
ID: 17136947
Can this be of any help? See #3 in the list on the followin link: http://www.appcontrols.com/components.html 
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question