On the road to custom wyUpdate

Hi,

I have just added the standard wyUpdate to my current project, tested it and it all works brilliantly, excellent software.

Now I am considering building a custom wyUpdate with my own branding and have been looking at the help file:-

http://wyday.com/wybuild/help/custom-wyupdate-version.php

I really need a few clarifications.

Where the help file says 'The important part is that add the wyUpdate.exe to the "Your program's folder":', I am guessing this means my own custom version of wyUpdate, for instance 'myUpdate.exe', am I correct?

Then about versions, the current version of wyUpdate is 2.6.11.3, so does that mean that when I create my custom wyUpdate and add it to wyBuild, do I add it as the same version number or can I set the version to say 2.7?

TRegards..,

Kirk

Where the help file says 'The important part is that add the wyUpdate.exe to the "Your program's folder":', I am guessing this means my own custom version of wyUpdate, for instance 'myUpdate.exe', am I correct?

Yes. You can call the exe anything so long as the filename remains the same between the versions.

Then about versions, the current version of wyUpdate is 2.6.11.3, so does that mean that when I create my custom wyUpdate and add it to wyBuild, do I add it as the same version number or can I set the version to say 2.7?

You should match the version number of our branch of wyUpdate. The reason is that when wyBuild builds your updates it embeds the latest version of wyUpdate as the minimum required version to install the update. So if you call your version "2.7" when wyUpdate is at v2.6.11.3 then this will cause problems.

That's why we recommend only changing the build number. For instance "2.6.11.XX".

Does this make sense?

Hi Sam,

yeah, I think I've got it now.

I'll give it a bash and keep my fingers crossed.

Regards..,

Kirk

Hi Sam,

OK, I just tried this out but am a little stuck.

I made my custom wyUpdate and changed to to v2.6.11.4 which from what I can make out is correct as the standard wyUpdate is v2.6.11.3.

I followed the help file and changed the version tab to read 2.6.11.4, built and uploaded the update to my server, it is there, I have had a look along with the *.wys file. The update says 'xxx.all.to.2.6.11.4.wyu', xxx being my filename.

I made the changes to my project in the FILE>PROPERTIES section as stated in the help file.

Rebuilt the wyUpdate for the new client.wyc file.

I then made a small change to my project to cause an update to be made from my current v2.4 to new v2.5.

I went through the process to create the update but made sure that for v2.5 of my project I included the newly generated client.wyc file.

Rebuilt wyUpdate, built the updates, where I did get warning about 'delete wyUpdate.exe'.

Uploaded the updates.

I then started my application, hit the update button, it checked, found the updates and installed. My application is now at v2.5 but the custom wyUpdate that I created is nowhere to be seen. In the application folder it still shows wyUpdate v2.6.11.3.

Have I missed something somewhere?

When I originally made my custom wyUpdate and started a project in wyBuild, should I have had the original version v2.6.11.3 in there also, the same way that a regular update is done?

Should I have left my custom wyUpdate as v2.6.11.3?

Any help would be appreciated.

Regards..,

Kirk 🤔

Rebuilt wyUpdate, built the updates, where I did get warning about 'delete wyUpdate.exe'.

From your custom wyUpdate project, correct? Not your main app's wyBuild project?

You can debug this problem by "backdating" the version of the intial version of wyUpdate to something like 2.6 (go into assemblyinfo.cs). This way, when your custom wyUpdate version fails to download it will give you a reason.

Hi Sam,

thanks for your reply.

I seem to be having difficulty with this, no idea why but I have thought of a possible way around, I shall try my best to layout my plans here and you can correct me if I am wrong.

1. My current application has been shipped with the current standard version of wyUpdate, this all works, checking for updates etc...

2. Using the wyUpdate source code, I create my own branded version of wyUpdate. I have changed the assembly name to 'myUpdate' all references to wyUpdate or wyDay within the AssemblyInfo.cs have been changed to reflect my own company and the new product name. This all works, it checks for updates etc...

Now for the tricky part.

3. Using wyBuild I create a patch to a new version of my main application having just the current projects files, say v1.1, in the 1.1 version tab but in the new version tab,1.2, I include the v1.2 main apps v1.2 files plus my new updater 'myUpdate'.

4. Build the patch etc...

5. When the app then checks for updates, it should download the v1.2 updates and install into the app's folder the new updater 'myUpdate', which would from then on be called from the 'Check for Updates' button instead of wyUpdate.

6. Unfortunately this would still leave the unused wyUpdate.exe within the app's folder.

So, is there a way to delete a file from the app's folder upon completion of a successful update using wyBuild?

Prior to wyBuild I have been using Indigo Rose Visual Patch and there are options to execute functions prior or after patching.

I hope this makes sense.

Regards..,

Kirk

3. Using wyBuild I create a patch to a new version of my main application having just the current projects files, say v1.1, in the 1.1 version tab but in the new version tab,1.2, I include the v1.2 main apps v1.2 files plus my new updater 'myUpdate'.

This is where you're going wrong. Firstly, you shouldn't include wyUpdate.exe (or whatever you renamed it) within your project. This isn't how the self-update works. When wyUpdate sees a file that is bound to replace itself and discard it. So all you're really doing is wasting the bandwidth of your users.

6. Unfortunately this would still leave the unused wyUpdate.exe within the app's folder.

You can't rename the updater as part of the update.

Prior to wyBuild I have been using Indigo Rose Visual Patch and there are options to execute functions prior or after patching.

You can execute files before and after your updates, however you can't rename wyUpdate when it's running. I suppose you could create a simple "bat" file that has the "Wait for execution to finish before continuing", and the "bat" file in turn waits for wyUpdate to exit. Then, once wyUpdate has exited it can rename it to whatever you want.

But all this seems overly complex. Why would you want to do this? You users will never see the "wyUpdate.exe" file.

This is where you're going wrong. Firstly, you shouldn't include wyUpdate.exe (or whatever you renamed it) within your project. This isn't how the self-update works. When wyUpdate sees a file that is bound to replace itself and discard it. So all you're really doing is wasting the bandwidth of your users.

I will have to have a look but I thought that I was only including wyUpdate with the initial setup release and not with any version updates, maybe I did by accident, probably where I am having trouble.

You can't rename the updater as part of the update.

No, I understand that wyUpdate cannot be renamed as part of the update. The update would install my own version of wyUpdate, then once the update had finished, delete the original wyUpdate.

You can execute files before and after your updates, however you can't rename wyUpdate when it's running. I suppose you could create a simple "bat" file that has the "Wait for execution to finish before continuing", and the "bat" file in turn waits for wyUpdate to exit. Then, once wyUpdate has exited it can rename it to whatever you want.

Thanks for the info, that is a possibilty.

But all this seems overly complex. Why would you want to do this? You users will never see the "wyUpdate.exe" file.

I guess it does sound complex and the only real reason for me thinking about doing it really is for aesthetics, where the end user could see inside the app's folder an exe that relates more to the actual main app, for instance, if my main app is called 'TableTop' the app's assembly is called 'TableTop.exe', then I would have an updater called 'TableTopUpdater.exe'. It would be more obvious to the end user when the updater is activated that a firewall warning regarding an application contacting the internet had a name actually based on the software they are using.

I know that not all firewalls pick up small things like that but mine did. When I first ran app after including wyUpdate, I had a popup asking me whether to allow or deny access to wyUpdate, obviously I knew what this program was and allowed it but prehaps an end user will not. This would be an issue as if wyUpdate is denied access, no updates can take place. I know I could make end users aware prior to this but sometimes maybe taking the element of uncertainty out of the equation can help.

Regards..,

Kirk

Hi,

I am still having trouble with this for some reason.

I think I have followed the guide to the letter.

Current version of wyUpdate is 2.6.11.3, standard version.

I used the source code to make my own version, which is v2.6.11.4

Started up wyBuild and created a project called NewUpdate.

Changed the version tab to read 2.6.11.4.

Added my new wyUpdate to the 'Your Programs Folder' under this tab.

Specified the server location etc.. Hit the 'Build wyUpdate' button, hit the 'Build Updates', then uploaded the updates to my server, they are there, I have looked.

I followed the next step to change the location of the 'Self-Update' server path in my current project properties.

This is the bit where I get a little stuck:-

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

rebuild wyUpdate - I take it this means the 'Build wyUpdate' button on my main applications wyBuild project?

If so, then I did this. I then included the newly generated 'client.wyc' file with a new version update of my main application. Is this correct?

I then built the Updates for my main application and uploaded them.

I did not include my 'NewUpdate' as part of my main application update.

I ran my application to check for updates, it downloaded and installed the changes I had made to the main application but did not update wyUpdate from the standard v2.6.11.3 to my variant of v2.6.11.4.

I then tried again but this time made my NewUpdate version number v1.1.

I set the wyday.com default server as the update server for wyUpdate within my application properties.

I made a small change to my main application to enable an update, as the help tutorial states, wyUpdate will only update if the main application has an update available.

Done all the steps needed to build the update and uploaded it.

Ran my application, it downloaded the few tweaks to the main application as normal, did not update wyUpdate.

Made a few more tweaks to my main application, generated the updates etc.. and uploaded.

Ran my application once again, this time it showed it was downloading wyUpdate & then updating, great I thought.

Upon completion I checked my main application, the tweaks I had just made had once again been applied.

I looked into my applications folder, wyUpdate.exe was there, it had been updated to the standard v2.6.11.3.

Obviously the self-update is working, somewhat, I am just missing something that is probably staring me in the face.

One thing that I have noticed is the files that were uploaded to my server for my cutom wyUpdate have a wyserver.wys file, as the help tutorial shows in the image, 'Self-update server file location', whereas the default wyday 'http://wyday.com/files/wyupdate/updates/client.wys' points to a client.wys file.

Any help would be appreciated.

Regards..,

Kirk

Finally got it.

I should not have been pressing the 'Build wyUpdate' button in my custom wyUpdate.

All sorted now.

Regards..,

Kirk

Great! Sorry about the confusion. We're working on an updated tutorial that will clear up some of the confusing points.

Great! Sorry about the confusion. We're working on an updated tutorial that will clear up some of the confusing points.

Hi Sam,

I actually found the answer in a previous reply you had made to another member on this forum.

Regards..,

Kirk