Sign in to follow this  

how do i make an update program

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Hello,

There is two part in an update program. The first part is the update engine, and the second part is the user interface. I'll let you do the UI by yourself - using wxWindows or whatever you want.

The web update engine can be implemented as this:

1) open a connection to a web server
2) (authenticate the copy if needed)
3) issue a GET command to get a text file which contains the list of updatable files and their version
4) compare each version to the installed versions
5) if a file has a newer version on the web server, download it

Another solution - which uses dynamic pages - is to send the different file versions to the web server (using a GET or POST command with parameters: "GET /path/updater.php?file1=1-3-4&file2=2-9-0" for example). The web server then send an archive (a zp file, for example) which contains the file that needs an update. This version requires a correct knowledge of PHP. It allows a manual update - the user enters its version number of a web pagfe and is redirected to this page as well.

Anyway it requires you to study:

1) socket programming - you want to create a client socket and connect to a web server. check here, there are some resources about socket programming.

2) basic HTTP commands syntax (GET, POST) - you can check the RFC 1945 (Hypertext Transfer Protocol -- HTTP/1.0) and RFC 2616 (Hypertext Transfer Protocol -- HTTP/1.1, draft). Up-to-date text version are here (1945) and here (2616). A simpler HHTP command list is hidden here.

This codeproject page contains interesting bits of code, since it contains everything you might want to use to build a HTTP client.

HTH,

Share this post


Link to post
Share on other sites
^ was me.

I repost it with all the links.

Hello,

There is two part in an update program. The first part is the update engine, and the second part is the user interface. I'll let you do the UI by yourself - using wxWindows or whatever you want.

The web update engine can be implemented as this:

1) open a connection to a web server
2) (authenticate the copy if needed)
3) issue a GET command to get a text file which contains the list of updatable files and their version
4) compare each version to the installed versions
5) if a file has a newer version on the web server, download it

Another solution - which uses dynamic pages - is to send the different file versions to the web server (using a GET or POST command with parameters: "GET /path/updater.php?file1=1-3-4&file2=2-9-0" for example). The web server then send an archive (a zp file, for example) which contains the file that needs an update. This version requires a correct knowledge of PHP. It allows a manual update - the user enters its version number of a web pagfe and is redirected to this page as well.

Anyway it requires you to study:

1) socket programming - you want to create a client socket and connect to a web server. check here, there are some resources about socket programming.

2) basic HTTP commands syntax (GET, POST) - you can check the RFC 1945 (Hypertext Transfer Protocol -- HTTP/1.0) and RFC 2616 (Hypertext Transfer Protocol -- HTTP/1.1, draft). Up-to-date text version are here (1945) and here (2616). A simpler HHTP command list is hidden here.

This codeproject page contains interesting bits of code, since it contains everything you might want to use to build a HTTP client.

HTH,

Share this post


Link to post
Share on other sites

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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