Solved

Update version Info

Posted on 2011-10-01
11
389 Views
Last Modified: 2012-05-12
Hi all. Another little question, hope not too difficult this one ;-)
I have builded an app whose goal is to update another app. So the system works this way: main app start and chech a php file on the web server passing to it the version info. If php file return outdated, main app launchs downloader and stops. Downloader... downloads, launchs updater and stops.
Updater app is not an installer: I preferred to build a little, simple app which can install not necessarily the main app with a new version number but others updated files.
The problem is that if I update another file and not the main app, this one still has the previous version number so each time it will contact the web server, it will receive outdated as respone.

So the problem is: can the updater program easily ;-) update the version info of the main app or it is a too difficult task? In this case I will think to some other...

Thanks in advance for any idea.

Cheers
0
Comment
Question by:Marco Gasi
11 Comments
 
LVL 4

Assisted Solution

by:WhiteSeed
WhiteSeed earned 100 total points
ID: 36897252
I think the best way to do this is to separate the file with the version information from the executable, creating a separate file or a registry key. To protect the application could also choose to that if these data are not revealed is considered the version of the executable.
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36897272
Hi, WhiteSeed. Yes, the registry key was an option I taken in consideration. What I was interested in was if it is possible to 'patch' version info. I yet asked about patch and it was said me that is a too difficult task. I thought that maybe version info are more easy to patch, but don't really know. So if no one else post I will give points to you.

Cheers
0
 
LVL 4

Expert Comment

by:WhiteSeed
ID: 36897354
I think this operation is possible ( because all is possibile) but is not simply because going to change a property of the file which is created to be not editable.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 32

Assisted Solution

by:ewangoya
ewangoya earned 100 total points
ID: 36898392
Program versions can be updated similar to the way you would do it manually with a resource editor.

Anyway, you can maintain a configuration file with the version info for all the different programs in your application. On checking for updates, download the current configuration file, compare the versions to determine what needs updating and what does not.
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36898552
Hi, ewangoya. Please can you explain what you mean with "Program versions can be updated similar to the way you would do it manually with a resource editor"? It seems to be exactly what I want to do but I don't know how to do it programmatically.

Thanks
0
 
LVL 4

Expert Comment

by:WhiteSeed
ID: 36898787
There is an example of this operation in the delphi example, but is not simply:
'C:\Users\Public\Documents\RAD Studio\8.0\Samples\Delphi\VCL\resXplor' or
Start > All Programs> Embarcadero rad Studio XE > Sample> Delphi\VCL\resXplor or
http://docwiki.embarcadero.com/CodeExamples/en/ResXplorer_Sample

I use delphi xe
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36899350
@WhiteSeed: well, sometime we have something in front of our very eyes but we don't see it! nevertheless, running that sample we can get resources but I don't see any method to get version number: I see it in the right string section, but TResourceItem doesn't expose any method to access it. I feel like a homeless which looks at the hamburger behind the shop window and he can't get it!
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36899354
...nor edit it!!!
0
 
LVL 1

Accepted Solution

by:
karagunes earned 300 total points
ID: 36907119
I would write a little dll. Export static version info and both apps will get version info from that dll. When you update that dll, all applications will be updated.

Also, you don't need to update version info of each apps. All do different things. Your main app is different than the updater. Why do you need to update version info of your updater? If you want to do that:

1. Create an update file
2. Downloader will download it
3. If download successful, downloader will run it and quit
4. Your update file will check if these apps are still running
5. If they are, updater will terminate both of them
6. Updater will copy new files and run the main app and quit...
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36909030
@karagunes, your approach seems to be tha one I'll follow, so I'm going to split points between all (since everyone said something interesting) but I'll give you the most part of points.

@all. Please, take a look at this other question: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_27377246.html#a36907996 For some strange reason I had no comment nor EE message about increase points etc.: it seems this question is totally ignored and I don't understand why. I can't request attention because the liunk is not present: maybe someone among you can tell me something about that question or about contactin the moderator.

Thank you very mutch for your help
0
 
LVL 31

Author Closing Comment

by:Marco Gasi
ID: 36909997
Thanks to all.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 200
Delphi TcxGrid group footer summary 3 268
Delphi 2 59
Multiple image collision 13 74
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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