Go to content

Main menu:

How to Implement Automatic Updates for Multimedia Fusion 2 and Clickteam Fusion Applications

Last Updated: June 23rd, 2014

When making software, programmers generally need to release the product multiple times. Sometimes these releases fixes critical bugs, add new features, or some other combination. One of the hardest things to do is to get the end-user to update software manually. So the easiest way to push an update is to let the software update itself! This tutorial will teach you the underlying principles behind adding an auto-update system, address various ways to achieve the feature, and various improvements that can be made after completion of this tutorial.

Quick Links:

Image of Dropbox Logo
Click to sign-up for an account at Dropbox.
Server of Choice: Dropbox
Usually, an application must receive data from an external source such a as a server in order to perform an update. The idea behind the server is as follows:

- Data is requested from the server
- The server sends the data to the source
- The source sends new data to be put in the server if needed.

One of the easiest servers to make use of is a local Dropbox account. With a Dropbox account, you are able to request and receive data from basic file types such as .txt files which is all that will be needed for this tutorial! If you are in need of a free server, Dropbox serves as a reasonable option.
Server Setup

Regardless of choice of server, another important aspect is the creation of a database. Some server may require the use of PhpMyAdmin or Linq databases, both of which contain fixed database structures. With respect to Dropbox, this "database" can simply be a plain text file with a fixed structure. A fixed database structure is required for efficient data by external programs. This information contained in this plain text file is what the application will receive. Sorting through to find the necessary data would be almost impossible unless the plain text file had a fixed structure.


If you are working with Dropbox simply create an account and upload a .txt file with any text in the file. You can practice retrieving the data through the Get Object in Multimedia Fusion 2 and Clickteam Fusion via the public (or private) link Dropbox provides for the .txt file.

**Note**
The Get Object only supports the HTTP protocol. As such if the link Dropbox returns begins with https, the Get Object will not successfully receive the data. To correct this, simply exchange the "https" for "http".

Click to enlarge each image
Flow Chart Explanations

The picture to the left explains the logic behind the auto update process, Each rectangular element (starting at the green rectangle) represents a step.


1. The Main Application Starts
2. Receive and parse information for an update check

- If update is available, proceed to step 3
- If update is not available, end the update process and continue with Main Application

3. Download the newly Updated Application from the server
4. Download and open the "Switch Application"
5. Close Main Application
6. Overwrite/Switch the Main Application with the Updated Application
7. Remove the outdated Main Application (if an overwrite was not performed)
8.  Close "Switch Application" and open the new Main Application

- Return to step 1.


The Switching Application

The purpose of the "Switching Application" is to replace the "Main Application" with the "Updated Application."

The "Switching Application" is required because a file cannot be modified if said file is in use by the computer. As such we must close the "Main Application" and open the "Switch Application" so the "Switch Application" can overwrite the "Main Application" with the "Updated Application."

After the switch between the "Main Application" and
the "Updated Application," the final act left is to open the "Updated Application" (which should have the exact name as the "Main Application") to repeat the process all over. If done properly, the application should not have an update available.

Summary & Final Remarks

In summary, adding an auto-update feature to an application is simple! Just follow and implement these steps:

  1. Start the main application
  2. Perform the update check
    1. If update is available, continue with update process to step 3
    2. If update is unavailable, quit update process and continue with main application
  3. Download updated files
  4. Switch and overwrite the main application with the updated files
  5. Open the newly updated main application
    1. - Return to step 1


Keep in mind this tutorial does not cover all aspects of the auto-update process. You must code the application in case the user loses internet connection while downloading, the server is down, or other such hindering scenarios. You may even want to allow the user a choice for the update.

These considerations and more should be considered as you create the auto-update feature. Check out the Tutorial PDF at the top of the page for a deeper explanation the concepts behind this tutorial.


Rate This Tutorial
Vote: 4.8/5
If you have read this tutorial, rate it from poor (1) to average (3) to great (5)!
Back to content | Back to main menu