Delphi Application Software

 Posted admin

Delphi delivers a comprehensive range of proven software solutions including. Delphi Technology's application architecture (OASIS) is a fully integrated. In 2009, Micro Focus acquired Borland, and continues to support the needs of software teams who must rapidly adapt to the volume and velocity of evolving business requirements. Micro Focus Application Delivery and Testing solutions—the former Borland portfolio—improve communication and collaboration between business, test, and development.

I've been thinking of rolling my own code for enabling my Delphi application to update seamlessly as I'll be going for 'release often, release early' mentality furthermore. There are various Delphi solutions (both freeware and paid) out there and I'd like to ask if you've been using any of them or simply went on with your own solutions in this area. Any comments on the auto-update topic are welcome.

utku_karatasutku_karatas

closed as primarily opinion-based by David Heffernan, karthik, Alex K, Zan Lynx, Shankar DamodaranJan 5 '15 at 1:03

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

10 Answers

Years ago I wrote a simple tool which is started instead of the real program, checks for updates, loads and installs them (if any are available), and finally starts the real application.

There are however problems with that approach if your program works in a properly administered environment, where users normally don't have write access to the program directories. You can no longer simply update your own program in such environments. That's why a lot of programs these days come with their own updater tool, which can be installed to run with elevated permissions, so that program updates can be applied even though only standard users do ever log on to the system.

You have to decide whether your target audience can be assumed to run on power user or administrator accounts, or whether you will have to deal with above-mentioned problems. With Vista things got considerably harder already.

With all these problems (net access over proxies, missing write permissions for installation directories, the need to update files that the updater itself is using - just to name a few) I wouldn't try again to code this on my own. Much better to check if any one of the available solutions does all you need it to.

mghiemghie

What ever scheme you use, it may be handy to know that you can actually rename a running .exe file. So rename file, copy in new file works nice. And the next time someone launch the program they will launch a the new version. This is ofcourse very handy in enviroment where many users run the same .exe file, like in citrix/terminal server/network share cases.


I use the Synapse routines GetHTTP to return a specific resource, and if found then check against the local system to see if an update is required. If so then the resource tells me what page to go to launch and I throw the URL into shell execute so the users preferred browser is displayed.

Most of the time the download is a setup program created by InnoSetup which updates the users system and database to the latest version. When a new 'paid' upgrade is needed, I then send the user to a 'purchase upgrade' form. My web resources are ASP pages, so I can redirect to a different resource based on the customers version number.

For the main application (our application has a server piece, and a client piece) I have a loader which will check the server to see if the version of the client file on the server is different than the version on the client..if so, it prompts the user if the user wants to update/revert. We chose to prompt the user as sometimes an accidental bug might make it into the system and the user has to downgrade/upgrade only specific machines to help troubleshoot. I maintain a database record with the minimum version required which is updated via the database patch, so if a version must be retired then the record is updated accordingly.

skamradtskamradt

I created my own solution too based on Indy for downloading and http://sourceforge.net/projects/makeupdate/ for file patching.Before that I have used and tried several commercial tools, but no one was doing exactly what I needed.

dangi

I use TmxWebUpdate. It's free, simple and gives you good control over the process. I actually own TMS Component Pack with TWebUpdate but never really found a good reason to switch.

Edit: Link updated

vradvrad

Normally we use the third party tool. But in some situations it was not usable so I created an own solution, which was pretty standard:

  • Get xml (or any other format) with update info.
  • If newer files are published, download and install them.
Toon KrijtheToon Krijthe

Delphi Application

I use TWebUpdate . It works ok and has a ton of interesting options, but documentation isn't so great and I did bump into a few problems - which is why I download a full installer, instead of just the files..

I will be keeping an eye on this question, btw..

stgstg

We rolled our own as well. Its really not too difficult.

Our process goes something like:

  • When the main app is launched, it checks (using funcs from the synapse library) if there's an update available (assuming its configured to check, of course).

  • If so, it notifies the user and askes if they want to update.

  • If they do, it launches an updater .exe, and closes the main app.

  • The updater exe downloads the new files based on the contents of a text file it retrieves, keepiing the files in memory.

  • When the updater is done downloading everything correctly, it then saves the downloaded files to disk, backing up any files it replaces. This way if the download gets interupted, you dont end up with half the files installed.

  • Finally, it launches the main app again, and closes itself.

The trick w/ Vista is that you need to have an entry in the updater program's manifest to force it to run with administrator rights.

GrandmasterBGrandmasterB

We use our own solution which follows these steps:

  1. Application connects to http resource and downloads info file (ini text file) to memory, checks version number of newest release.
  2. If newer version available, app downloads compressed binary package to exe location.
  3. When download is finished, user is asked to restart application.
  4. Upon start, application checks for presence of update package
  5. App extracts package contents (usually a new app exe, but additional resources possible as well, e.g. updated language files etc.) - for each file it renames the current/old file to a temp name first, then extracts the new file. If the process fails at any point, the temp files are restored.
  6. When finished, app executes new exe and closes itself.

No additional updater needed, the app exe can handle it all by itself.

For the compressed package we use our own update builder.The package contains an index of files with a file hash, destination folder (relative path to main exe) and the compressed files.During update we compare the stored hash with the extracted file to detect corupted files.

With Vista I see two solutions to enable Standard User Accounts to actually update the applications files:

  1. Configure your setup to change permissions of the programs installation directory. This way files in 'C:Program Files (x86)Your CompanyYou App' can be modified on Accounts with limited rights.

    Example code for InnoSetup would be:

  2. Install files that you plan to update to the ProgramData folder instead of the user defined directory and use this directory as an override folder. If files exist in ProgramData, use those, else check in install dir.

    InnoSetup code:

user212218
BlackOutBlackOut

Same as 'stg' and 'GuyWithDogs', I'm using TWebUpdate from TMS. Although the documentation isn't so great, Its not so difficult to learnt.

With TWebUpdate, you have some options what the protocol you use, it could be done via HTTP, FTP or network access.

For communication layer, TWebUpdate uses WinInet. In some machines, the windows / IE URL cache can be frustating, so I've added a routine to clear the auto-update server address from cache first to ensure the information gathered from the server is up-to-date.

bprasetiobprasetio

Not the answer you're looking for? Browse other questions tagged delphiauto-update or ask your own question.

I've been thinking of rolling my own code for enabling my Delphi application to update seamlessly as I'll be going for 'release often, release early' mentality furthermore. There are various Delphi solutions (both freeware and paid) out there and I'd like to ask if you've been using any of them or simply went on with your own solutions in this area. Any comments on the auto-update topic are welcome.

utku_karatasutku_karatas

closed as primarily opinion-based by David Heffernan, karthik, Alex K, Zan Lynx, Shankar DamodaranJan 5 '15 at 1:03

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

10 Answers

Years ago I wrote a simple tool which is started instead of the real program, checks for updates, loads and installs them (if any are available), and finally starts the real application.

There are however problems with that approach if your program works in a properly administered environment, where users normally don't have write access to the program directories. You can no longer simply update your own program in such environments. That's why a lot of programs these days come with their own updater tool, which can be installed to run with elevated permissions, so that program updates can be applied even though only standard users do ever log on to the system.

You have to decide whether your target audience can be assumed to run on power user or administrator accounts, or whether you will have to deal with above-mentioned problems. With Vista things got considerably harder already.

With all these problems (net access over proxies, missing write permissions for installation directories, the need to update files that the updater itself is using - just to name a few) I wouldn't try again to code this on my own. Much better to check if any one of the available solutions does all you need it to.

mghiemghie

What ever scheme you use, it may be handy to know that you can actually rename a running .exe file. So rename file, copy in new file works nice. And the next time someone launch the program they will launch a the new version. This is ofcourse very handy in enviroment where many users run the same .exe file, like in citrix/terminal server/network share cases.


I use the Synapse routines GetHTTP to return a specific resource, and if found then check against the local system to see if an update is required. If so then the resource tells me what page to go to launch and I throw the URL into shell execute so the users preferred browser is displayed.

Most of the time the download is a setup program created by InnoSetup which updates the users system and database to the latest version. When a new 'paid' upgrade is needed, I then send the user to a 'purchase upgrade' form. My web resources are ASP pages, so I can redirect to a different resource based on the customers version number.

For the main application (our application has a server piece, and a client piece) I have a loader which will check the server to see if the version of the client file on the server is different than the version on the client..if so, it prompts the user if the user wants to update/revert. We chose to prompt the user as sometimes an accidental bug might make it into the system and the user has to downgrade/upgrade only specific machines to help troubleshoot. I maintain a database record with the minimum version required which is updated via the database patch, so if a version must be retired then the record is updated accordingly.

skamradtskamradt

I created my own solution too based on Indy for downloading and http://sourceforge.net/projects/makeupdate/ for file patching.Before that I have used and tried several commercial tools, but no one was doing exactly what I needed.

dangi

I use TmxWebUpdate. It's free, simple and gives you good control over the process. I actually own TMS Component Pack with TWebUpdate but never really found a good reason to switch.

Software

Edit: Link updated

vradvrad

Normally we use the third party tool. But in some situations it was not usable so I created an own solution, which was pretty standard:

  • Get xml (or any other format) with update info.
  • If newer files are published, download and install them.
Toon KrijtheToon Krijthe

I use TWebUpdate . It works ok and has a ton of interesting options, but documentation isn't so great and I did bump into a few problems - which is why I download a full installer, instead of just the files..

I will be keeping an eye on this question, btw..

stgstg

We rolled our own as well. Its really not too difficult.

Our process goes something like:

  • When the main app is launched, it checks (using funcs from the synapse library) if there's an update available (assuming its configured to check, of course).

  • If so, it notifies the user and askes if they want to update.

  • If they do, it launches an updater .exe, and closes the main app.

  • The updater exe downloads the new files based on the contents of a text file it retrieves, keepiing the files in memory.

  • When the updater is done downloading everything correctly, it then saves the downloaded files to disk, backing up any files it replaces. This way if the download gets interupted, you dont end up with half the files installed.

  • Finally, it launches the main app again, and closes itself.

The trick w/ Vista is that you need to have an entry in the updater program's manifest to force it to run with administrator rights.

GrandmasterBGrandmasterB

We use our own solution which follows these steps:

Windows 7 loader released by Daz Team enables you to fully activate and unlock all the hidden features in Windows 7 within matter of minutes. Just download, run. Windows 7 Activator Everyone finding information about how to activate windows 7 with windows 7 ultimate activator. It’s not a big problem you just need to activate windows 7 premium version with licensed. Free download windows 7 activator for windows 32 bit and 64 bit here freely. At Activators pro you can get software Activation Codes and keys with full version cracks. Complete installation guides available. Features Windows 7 Activator 2018. After the release of Windows 7 Operating System the Windows Vista was neglected on the behalf of the bugs of the previous Operating System. It was overwhelming to the users and more reliable compared to the previous one. Windows 7 pro activator 2018.

  1. Application connects to http resource and downloads info file (ini text file) to memory, checks version number of newest release.
  2. If newer version available, app downloads compressed binary package to exe location.
  3. When download is finished, user is asked to restart application.
  4. Upon start, application checks for presence of update package
  5. App extracts package contents (usually a new app exe, but additional resources possible as well, e.g. updated language files etc.) - for each file it renames the current/old file to a temp name first, then extracts the new file. If the process fails at any point, the temp files are restored.
  6. When finished, app executes new exe and closes itself.

No additional updater needed, the app exe can handle it all by itself.

For the compressed package we use our own update builder.The package contains an index of files with a file hash, destination folder (relative path to main exe) and the compressed files.During update we compare the stored hash with the extracted file to detect corupted files.

With Vista I see two solutions to enable Standard User Accounts to actually update the applications files:

  1. Configure your setup to change permissions of the programs installation directory. This way files in 'C:Program Files (x86)Your CompanyYou App' can be modified on Accounts with limited rights.

    Example code for InnoSetup would be:

  2. Install files that you plan to update to the ProgramData folder instead of the user defined directory and use this directory as an override folder. If files exist in ProgramData, use those, else check in install dir.

    InnoSetup code:

user212218
BlackOutBlackOut

Same as 'stg' and 'GuyWithDogs', I'm using TWebUpdate from TMS. Although the documentation isn't so great, Its not so difficult to learnt.

With TWebUpdate, you have some options what the protocol you use, it could be done via HTTP, FTP or network access.

For communication layer, TWebUpdate uses WinInet. In some machines, the windows / IE URL cache can be frustating, so I've added a routine to clear the auto-update server address from cache first to ensure the information gathered from the server is up-to-date.

bprasetiobprasetio
Delphi Application SoftwareDelphi computer software

Not the answer you're looking for? Browse other questions tagged delphiauto-update or ask your own question.