Board index » delphi » Dynamically update/patch an application

Dynamically update/patch an application


2003-07-08 11:36:30 PM
delphi1
Hi,
Has any of you ever tried to dynamically update/patch an application
developed with Delphi? I have some ideas as how to do that, but would
appreciate any idea that you may have... Links, source codes, etc. are more
than welcome. Note, though, that the project I am working on is freeware
(source code included), so I am after a free solution (with source code).
Cheers, Alan.
 
 

Re:Dynamically update/patch an application

Quote
source codes,
exodus.jabberstudio.org
Enjoy
Ricardo
 

Re:Dynamically update/patch an application

Quote
Has any of you ever tried to dynamically update/patch an application
developed with Delphi? I have some ideas as how to do that, but would
appreciate any idea that you may have... Links, source codes, etc. are
more
than welcome. Note, though, that the project I am working on is freeware
(source code included), so I am after a free solution (with source code).
What I have done earlier is to store an EXE file (small one) as part of my
app's resources. Then, when I need to update, I download the new file
someplace, extract this EXE from the app's resource into the same folder as
my app, run it (with command line parameters specifying my downloaded
location) and halt the application's execution. The EXE now waits till the
app has unloaded ( I also pass a process ID as a command line parameter, so
I can do a WaitForSingleObject) and then overwrites the application's EXE
with the new downloaded file. Then it runs the new EXE with a command line
parameter which allows the new EXE to delete this "updater" EXE.
WinNT and 2k etc. have an option that allows an application to "detach" from
it's own file so you can delete or rename the file when hte application is
still executing...I haven't explored that but it won't work on Win9x/ME.
--
Deepak Shenoy (TeamB)
Agni Software
www.agnisoft.com
 

Re:Dynamically update/patch an application

Quote
Sounds like an interesting solution... I hadn't thought of putting the
updater EXE in the main app's resource. Do you, by any chance, have some
code that you would be willing to share with me? That would just be to
save
me some time...
Unfortunately this was a while ago but I will check it out to see if I can
have something usable.
Quote
Otherwise, do you update the whole app, or do you patch it?
Update the whole app. If you have a "patch" exe you could download that and
use the patch exe to update your application of course.
Quote
>WinNT and 2k etc. have an option that allows an application to "detach"
from
>it's own file so you can delete or rename the file when hte application
is
>still executing...I haven't explored that but it won't work on Win9x/ME.

Hmm... sounds interesting... would you by any chance have a link I could
look up?
I read this in a Jeff Richter (MSJ) column long back but it is not like I
described it above. The file gets deleted automatically AFTER execution
terminates...:
www.microsoft.com/msj/0198/win320198.aspx
Turns out it might even work on Win9x.
--
Deepak Shenoy (TeamB)
Agni Software
www.agnisoft.com
 

Re:Dynamically update/patch an application

"Brion L. Webster" <XXXX@XXXXX.COM>writes
Quote
Well, you can compile anything into an executable. So compile the stub
into
the main app, after the main app launches, have it extract the stub
(perhaps
do a version check first?). Searching the newsgroups on "embedding font
into
executable" or something like that should turn up links on how to create &
compile the resource file.
Yes, I have just embedded my update program into my main app's executable.
Still have to finish the job though (i.e. extract it and run the update
program), but on the way...
Cheers, Alan.
 

Re:Dynamically update/patch an application

"Deepak Shenoy (TeamB)" <shenoy.donotspam@agnisoftdotcom>writes news:XXXX@XXXXX.COM...
Quote

What I have done earlier is to store an EXE file (small one) as part of my
app's resources. Then, when I need to update, I download the new file
someplace, extract this EXE from the app's resource into the same folder as
my app, run it (with command line parameters specifying my downloaded
location) and halt the application's execution.
[snip]
What's the advantage of having the exe inlcuded in the main application
as a resource, why would one want to "hide" it inside the main exe?
just curious
TIA
Radek