Jump to content
Sign in to follow this  
AfterBurn

How to make a update patch

Recommended Posts

AfterBurn

Ok I have been browsing around and I cant seem to find any info on how to make a update patch/mabye just looking in wrong places.I have made a autoit script and I have compiled it to a .exe file. So lets say I have a autoit file that has 2 #include files I compiled that to a .exe file lets call it example.exe now what I want to do is make another .exe that when ran will update one of the #include files of example.exe. Is this possible or is there already a script made for that. Any help would be nice thank you. ( Remember I am new only using autoit for less than 2 weeks now.)

Share this post


Link to post
Share on other sites
AdmiralAlkex

You can't change parts of a compiled file, either recompile everything as usual or never compile at all i.e. stay with .au3 (since they can be easily "patched")

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites
Spiff59

Ok I have been browsing around and I cant seem to find any info on how to make a update patch/mabye just looking in wrong places.I have made a autoit script and I have compiled it to a .exe file. So lets say I have a autoit file that has 2 #include files I compiled that to a .exe file lets call it example.exe now what I want to do is make another .exe that when ran will update one of the #include files of example.exe. Is this possible or is there already a script made for that. Any help would be nice thank you. ( Remember I am new only using autoit for less than 2 weeks now.)

The #include files are only loaded into the program once, when you compile it to an .exe.

You have to recompile the script to pick up any #include changes. A script can easily be used to do the compile if you like.

If you are using some custom "includes" of your own making, and they may be modified often, just put them in a .txt file, or .ini file, (or even database) and manually read them into your program each time it's kicked off. It will take a bit longer to initialize, but future updates will take effect automatically.

A better description of your scenario would likely allow us to offer more specific advice.

Edited by Spiff59

Share this post


Link to post
Share on other sites
AfterBurn

The #include files are only loaded into the program once, when you compile it to an .exe.

You have to recompile the script to pick up any #include changes. A script can easily be used to do the compile if you like.

If you are using some custom "includes" of your own making, and they may be modified often, just put them in a .txt file, or .ini file, (or even database) and manually read them into your program each time it's kicked off. It will take a bit longer to initialize, but future updates will take effect automatically.

A better description of your scenario would likely allow us to offer more specific advice.

Thank you I think you have answered my question. So if I compile it to a .exe and have it read from a .ini then I can replace the .ini file with the updated one and it will read from the new being like a patch update. The program itself never changes its just the info in the #include file such as address and stuff change. I think this will work being new to this is it a complicated script to get it to read from a external .ini in the same folder

Share this post


Link to post
Share on other sites
nicero

Patching EXEs is a common practice since the earliest ages of PCs, when networks were not as fast as now and disk space was not as large as today. The logic at the base of patching an EXE is that you have to have a program that gets the differences between the old EXE and the new EXE and builds a third EXE that will go to patch the old EXE.

 

Two good softwares that do this job are xdelta and bsdiff.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.