Creating an Update Server

This page will guide you on how to setup and host an update server to ensure end-users are prompted for an update for a given application.

When an NDEVR project is built, two files are generated. An ‘update’ text file which lets the software know that there is an update, as well as the installer file (MSI, APK, etc). By hosting these files online, the end user can be automatically prompted to download updates.

Initial Server Setup

1) Create Server to Host Update File

Create a static online location to host the ‘update’ text file. This file is generated when a software package is built. It’s purpose is to define the current release and redirect the software to the location of the current release.

Note once setup, the URL for this file should never change, as software will always look to this this static location to find the address of the active installer file. Changing this address will cause software built with this address to be unable to update.

If you support multiple platforms (Windows, Android, etc), create a separate location for each platform.

EXAMPLE Addresses
				
					https://www.[your website]/Updates/Windows/[generated name].txt
https://www.[your website]/Updates/iOS/[generated name].txt
				
			
2) Modify Project to Point To Server

a) If your project is managed by NDEVR, simply send us the URL from the previous step and we will complete this step.

b) If you are building the project yourself, edit the C++ project’s generated module file and add the static address path to an instance of NDEVRUpdateChecker in the Set Update Checker function. Set this as the application’s Update Checker.

				
					void NDEVRMapProSetUpdateCheckerForNDEVR()
{
	NDEVRUpdateChecker* checker = new NDEVRUpdateChecker();
	checker->android_update_address.set("https://www.ndevr.org/Update/Android/");
	checker->mac_os_update_address.set("https://www.ndevr.org/Update/Mac/");
	checker->windows_update_address.set("https://www.ndevr.org/Update/Windows/");
	checker->ios_update_address.set("https://www.ndevr.org/Update/IOS/");
	UpdateChecker::setApplicationUpdateChecker(checker);
}
				
			

Generating a Release

1) Perform Build

Either perform code build, or request build of project from NDEVR. Build should generate the txt update file, and an installation file (MSI, apk, etc)

2) Upload Generated Software

Upload the installation file to an address. Note this address can be anything and does not need to be in the same location as the update text file.

3) Update the Text File

Once the installer is fully uploaded to the specified address, update the txt file with the location of the installation.

EXAMPLE TEXT FIle Content
				
					{"version":"1.1.9","name":"Product Installer.msi","url":"https://[path to my installer]_1_1_9.msi"}
				
			
4) Upload the Text File
Upload the ‘update’ text file to the address specified in the first step of “Creating an Update Server”. This will trigger an update to end-users allowing them to update to the posted version.