Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I don't "get" how a program can update itself. How can I make my software update?

Tags:

c#

patch

upgrade

Say I make an .exe file and everything is peachy. Wonderful it works.

Say I worked on a new feature on the software and I want it to be available for people who already have the older version, how can I make the software find my new version, patch it, and then go about it's business.

I can't seem to wrap my head around the issue.

Thank you.

EDIT: I'm sorry for the confusion, but I was meaning a more code-wise answer. Is there something special in my code I should have to allow updating?

For example, if I want to add a new feature, how can I add a "method" to an already packaged .exe? :S That has me in a swivel.

like image 854
Sergio Tapia Avatar asked Nov 17 '09 12:11

Sergio Tapia


People also ask

How do I make software update automatically?

From your Home screen, tap the Application screen icon. Find and tap Settings > About phone/tablet > Software update > menu button (three vertical dots) > Settings. Tap Auto-update apps and select the relevant option.

Why is my software not updating?

If your Android device won't update, it might have to do with your Wi-Fi connection, battery, storage space, or the age of your device. Android mobile devices usually update automatically, but updates can be delayed or prevented for various reasons.


2 Answers

A popular solution is to actually have a separate process replace the necessary files.

Have you ever noticed that Firefox has to restart whenever it updates? Well, that is because a separate process (updater.exe) is downloading the files, closing firefox, replacing the files, and then starting firefox again.

edit of course this assumes you're hosting a list of updates online that the updater program can check (an RSS feed, or even a simple text file).

like image 197
Matt Avatar answered Oct 11 '22 17:10

Matt


Usually the process is as follows:

  • the user starts the applicataion
  • the application launches an "updater" (another program)
  • the updater retrieves from the Internet if a newer version exists
  • if that's the case, propose the user to update
  • the users accepts, the updater downlads the new install package (that can be incremental)
  • the updater shuts the application down (or better, asks the user to do it) and launches the new installer.
  • the installation package do the rest

Of course you can have many variation, but this is the basic way to do it.

On Windows, at least, some software install an updater deamon that is always on and checks for new updates of the software it takes care (GoogleUpdater, for example).

like image 22
Remo.D Avatar answered Oct 11 '22 19:10

Remo.D