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.
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.
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":
After you've added the files within wyBuild you need to do a few more things:
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:
Now rebuild wyUpdate to generate the new client.wyc file that references your server as the location for the wyUpdate self-updates.
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).
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:
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: