[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

Update version Info

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
Marco Gasi
Asked:
Marco Gasi
3 Solutions
 
WhiteSeedCommented:
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
 
Marco GasiFreelancerAuthor Commented:
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
 
WhiteSeedCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Ephraim WangoyaCommented:
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
 
Marco GasiFreelancerAuthor Commented:
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
 
WhiteSeedCommented:
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
 
Marco GasiFreelancerAuthor Commented:
@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
 
Marco GasiFreelancerAuthor Commented:
...nor edit it!!!
0
 
karagunesCommented:
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
 
Marco GasiFreelancerAuthor Commented:
@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
 
Marco GasiFreelancerAuthor Commented:
Thanks to all.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now