wyDay blog  |  Downloads  |  Buy
Support forum
wyDay blog
wyDay Home

How to make a custom version of wyUpdate

wyUpdate is completely open source. Some of our customers choose to add special features specific to their products. This article will teach you how to maintain your own version of wyUpdate so self-updates continue to work.

Getting the source

You can get the wyUpdate source code by either downloading the source code zip file available on the wyUpdate page, or by checking out the source code from our git repository.

Create a wyBuild project for your custom wyUpdate

After you've modified the source code to meet your needs, you'll need to create a new wyBuild project for wyUpdate. Name it anything you want. The important part is that add the wyUpdate.exe to the "Your program's folder":

Adding custom wyUpdate to wyBuild

After you've added the files within wyBuild you need to do a few more things:

  1. Specify where the updates will be stored on your server in the download site list.
  2. Go to "File -> Properties -> Update & server files" and change the "Server filename" to something different than your other projects will use (e.g. "selfupdate.wys").
  3. Then simply build and upload the updates to your server.

Self-update server file location

After you've created your custom version and uploaded the first version to your web server, you'll need to take one more step. You'll need to open your main application's wyBuild project file and modify the server that wyUpdate should look for self-updates.

Click "File -> Properties" in wyBuild, then go to the "wyUpdate" tab. Simply change the default self-update server file to the *.wys file located on your servers:

Custom wyUpdate location

Now rebuild wyUpdate to generate the new client.wyc file that references your server as the location for the wyUpdate self-updates.

wyUpdate version numbers

It's recommended you keep the same version numbers as the main branch of wyUpdate. The reason is that when wyBuild creates the updates to your application it embeds a "minimum wyUpdate version required for the update" in the *.wys file. This version number is equal to the version of wyUpdate shipped with that particular version of wyBuild.

If you do modify the version numbers, then only modify the build number (see version numbers).

When wyUpdate self-updates

wyUpdate only self-updates when there is a new version of your app available. If a new version of your app is available and a new wyUpdate version is available then the new version of wyUpdate is downloaded and installed before your app is downloaded and installed.

If the newer version of wyUpdate fails to download or install 1 of 2 things can happen:

  1. If the installed version of wyUpdate is older than the "minimum required version": your update will never be downloaded, instead an error will be shown.
  2. If the installed version of wyUpdate is equal to or newer than the "minimum required version": your update will continue to download an install and your user will be none the wiser.

Hide "delete wyUpdate.exe" warning in wyBuild

When you include wyUpdate.exe in your wyBuild project and build the updates, wyBuild warns you that you should delete wyUpdate.exe because it self-updates. This is fine for regular projects, but since you're creating a self-update project these warnings are meaningless.

To hide these warning go to File -> Properties and check the "Hide the warning 'Delete wyUpdate.exe from this project'" checkbox:

Hide wyUpdate warnings