Solved

Auto update for application via internet?

Posted on 2006-07-11
6
2,676 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:Marius0188
Comment Utility
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
Comment Utility
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
Comment Utility
Can this be of any help? See #3 in the list on the followin link: http://www.appcontrols.com/components.html
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now