You are viewing our Forum Archives. To view or take place in current topics click here.
How To Add An Automatic Updater To Your Forms With Pictures
Posted:
How To Add An Automatic Updater To Your Forms With PicturesPosted:
Status: Offline
Joined: Mar 26, 201113Year Member
Posts: 360
Reputation Power: 18
Status: Offline
Joined: Mar 26, 201113Year Member
Posts: 360
Reputation Power: 18
here is a direct link to start the download if you want a text file of this with all the pictures:
[ Register or Signin to view external links. ]
thanks
Step 1: Get wyBuild
The first thing you need to do is download and install wyBuild. The wyBuild installer contains everything you need to add updating to your application. (yes there is a free version(cracked) out there)
download link:
[ Register or Signin to view external links. ]
Step 2: Start wyBuild & Create a new project
After downloading and installing wyBuild you'll have the purple wyBuild icon on your desktop. Double click it and create a new project.
[ Register or Signin to view external links. ]
Step 3: Building wyUpdate
A. Enter your Product & Company names. Simply enter your product and company names in the textboxes.
[ Register or Signin to view external links. ]
B. Chose the wyUpdate branding
You can choose from one of the pre-made themes, or you can create your own:
[ Register or Signin to view external links. ]
C. Select languages & translate wyUpdate
You can include multiple translations of wyUpdate. Either choose from one of the included translations, or create your own translation.
[ Register or Signin to view external links. ]
D. Set the version you'll be including wyUpdate with
wyBuild doesn't need to know about all your earlier versions. Just start with the current version you'll be releasing to your users, and enter that in the version textbox in wyBuild:
[ Register or Signin to view external links. ]
You don't need to enter changes for this version, since no one will be updating to this version.
E. Sites where the updates will be downloaded from
Now we'll set where wyUpdate will download updates from:
[ Register or Signin to view external links. ]
You should specify the site in the form of [protocol]://[sitename]/sub/directories/%file%. For example: [ Register or Signin to view external links. ]
wyUpdate can download from any of the following protocols:
http://
https://
ftp://
file://
F. Build wyUpdate
Now we're ready to build wyUpdate for inclusion with version 1.1 of your app. Click the "Build wyUpdate" button:
[ Register or Signin to view external links. ]
G. Build blank update & upload it
As you may have noticed earlier, we haven't added any files to your project. That's alright. For the first version of your product that includes wyUpdate you'll just be building a blank update. That way when wyUpdate checks with your servers it knows that it's up-to-date.
To build the blank update simply click the "Build Updates" button:
[ Register or Signin to view external links. ]
Upload the blank update you just built. You can add any FTP or SFTP (aka SSH FTP) sites directly within wyBuild. After you've added the sites you'll be uploading your updates to, click "Upload updates".
[ Register or Signin to view external links. ]
If your server isn't capable of accepting FTP or SFTP uploads, you can use any 3rd party uploader program (e.g. Cyberduck) to upload your updates.
H. Test wyUpdate
Now run wyUpdate. It should say you have the latest version installed.
[ Register or Signin to view external links. ]
Step 4: Integrating the updater with your app
To add updating ability to your app all you have to do is add the wyUpdate.exe and client.wyc files with your application. Of course, you can more deeply integrate wyUpdate in your app.
.NET Apps: Use the AutomaticUpdater
If you're making a .NET app and you want full control over every step of the updating process then use the AutomaticUpdater.
Tutorial for Windows Forms apps
After adding the AutomaticUpdater to your app, try checking for updates within your app. It should say you're all up to date:
[ Register or Signin to view external links. ]
Step 6: First update
Add your first version files
If you haven't already done so, you'll need to add the files for your first version of your app to wyBuild. wyBuild only references files from disk it does not store your files for you, which means this involves 3 steps:
Create a folder to store the files for this first version that includes wyUpdate (in this example we call it version 1.1).
Copy all of the files from version 1.1 of your app into this folder.
Drag all the files into wyBuild from inside this "1.1" folder you just copied.
Add your new version files
Now that you've added the first version of your app into wyBuild we need to do the similar process for the next version (let's call it version 1.2):
Create a folder to store the files for this new version (we're calling it 1.2).
Copy all of the files from version 1.2 of your app into this folder.
Click the "new version" tab in wyBuild:
Drag all the files into wyBuild from inside this "1.2" folder you just copied.
Re-build wyUpdate
We're going to re-build wyUpdate. As you'll notice this re-built version will be for inclusion with version 1.2 of your app (as opposed to before, when you built wyUpdate for version 1.1 of your app).
Build your updates
In the steps above you added all the files from two version of your app (we're calling them 1.1 and 1.2). Now when you click "Build update" button, wyBuild will dynamically scan the files on disk and generate small patches for you.
Upload the updates to your server
Click the "Upload updates" button to upload your newly created update files. Now your users will be able to update to the new version of your app.
(Optional) Testing the update
If you want to test the update process you'll need to do 2 things:
Make a duplicate of your "1.1" version of your app (including the "client.wyc" and "wyUpdate.exe" files).
Run your app (if you're using the AutomaticUpdater) or just run wyUpdate.exe (if you're using it as a standalone updater).
Note: You don't want to test updating over your original files. Always make a copy of the folder to do the testing.
(Optional) Build your new installer
When you're building your installer, include all of your app files and folders along with the newly re-built "wyUpdate.exe" and "client.wyc" for version 1.2 of your app.
Credit Goes To: http://wyday.com/wybuild/help/walkthrough.php
Last edited by Nathanael ; edited 1 time in total
[ Register or Signin to view external links. ]
thanks
Step 1: Get wyBuild
The first thing you need to do is download and install wyBuild. The wyBuild installer contains everything you need to add updating to your application. (yes there is a free version(cracked) out there)
download link:
[ Register or Signin to view external links. ]
Step 2: Start wyBuild & Create a new project
After downloading and installing wyBuild you'll have the purple wyBuild icon on your desktop. Double click it and create a new project.
[ Register or Signin to view external links. ]
Step 3: Building wyUpdate
A. Enter your Product & Company names. Simply enter your product and company names in the textboxes.
[ Register or Signin to view external links. ]
B. Chose the wyUpdate branding
You can choose from one of the pre-made themes, or you can create your own:
[ Register or Signin to view external links. ]
C. Select languages & translate wyUpdate
You can include multiple translations of wyUpdate. Either choose from one of the included translations, or create your own translation.
[ Register or Signin to view external links. ]
D. Set the version you'll be including wyUpdate with
wyBuild doesn't need to know about all your earlier versions. Just start with the current version you'll be releasing to your users, and enter that in the version textbox in wyBuild:
[ Register or Signin to view external links. ]
You don't need to enter changes for this version, since no one will be updating to this version.
E. Sites where the updates will be downloaded from
Now we'll set where wyUpdate will download updates from:
[ Register or Signin to view external links. ]
You should specify the site in the form of [protocol]://[sitename]/sub/directories/%file%. For example: [ Register or Signin to view external links. ]
wyUpdate can download from any of the following protocols:
http://
https://
ftp://
file://
F. Build wyUpdate
Now we're ready to build wyUpdate for inclusion with version 1.1 of your app. Click the "Build wyUpdate" button:
[ Register or Signin to view external links. ]
G. Build blank update & upload it
As you may have noticed earlier, we haven't added any files to your project. That's alright. For the first version of your product that includes wyUpdate you'll just be building a blank update. That way when wyUpdate checks with your servers it knows that it's up-to-date.
To build the blank update simply click the "Build Updates" button:
[ Register or Signin to view external links. ]
Upload the blank update you just built. You can add any FTP or SFTP (aka SSH FTP) sites directly within wyBuild. After you've added the sites you'll be uploading your updates to, click "Upload updates".
[ Register or Signin to view external links. ]
If your server isn't capable of accepting FTP or SFTP uploads, you can use any 3rd party uploader program (e.g. Cyberduck) to upload your updates.
H. Test wyUpdate
Now run wyUpdate. It should say you have the latest version installed.
[ Register or Signin to view external links. ]
Step 4: Integrating the updater with your app
To add updating ability to your app all you have to do is add the wyUpdate.exe and client.wyc files with your application. Of course, you can more deeply integrate wyUpdate in your app.
.NET Apps: Use the AutomaticUpdater
If you're making a .NET app and you want full control over every step of the updating process then use the AutomaticUpdater.
Tutorial for Windows Forms apps
Add the AutomaticUpdater control to Visual Studio Toolbox
You need to add the AutomaticUpdater control to your Visual Studio Toolbox. Do this by right clicking the Toolbox, selecting "Choose Items...", and browsing for the AutomaticUpdater.dll.
[ Register or Signin to view external links. ]
Then simply choose the correct AutomaticUpdater.dll for your app. There are 2 separate builds of the AutomaticUpdater: one for .NET 2.0, 3.0, and 3.5 apps and one for .NET 4.0 apps.
For .NET 2.0, 3.0, and 3.5
If your app is compiled for .NET 2.0, 3.0, or 3.5 then use AutomaticUpdater.dll located in the "AutomaticUpdater" folder:
C:\Program Files\wyBuild\AutomaticUpdater\AutomaticUpdater.dll
or
C:\Program Files (x86)\wyBuild\AutomaticUpdater\AutomaticUpdater.dll
For .NET 4.0
If your app is compiled for .NET 4.0 then use AutomaticUpdater.dll located in the "AutomaticUpdater\Microsoft .NET 4.0" folder:
C:\Program Files\wyBuild\AutomaticUpdater\Microsoft .NET 4.0\AutomaticUpdater.dll
or
C:\Program Files (x86)\wyBuild\AutomaticUpdater\Microsoft .NET 4.0\AutomaticUpdater.dll
Drag the AutomaticUpdater control to your .NET app
Now drag the AutomaticUpdater control to your main form.
[ Register or Signin to view external links. ]
Finishing touches
Check for update menu
Add a "Check for updates" menu to your form:
[ Register or Signin to view external links. ]
Then associate the menu item with the AutomaticUpdater control.
If you're using a MainMenu: set the MenuItem property of the AutomaticUpdater.
If you're using a MenuStrip: set the ToolStripItem property of the AutomaticUpdater.
Set the GUID
Also generate a GUID (Globally Unique ID) for the AutomaticUpdater control by clicking the ellipsis button.
[ Register or Signin to view external links. ]
Anchor
Lastly, you can change the way the AutomaticUpdater control animates to show more information by setting the Anchor property on the control:
[ Register or Signin to view external links. ]
If you set the Anchor property to be "Top, Left" the AutomaticUpdater control will animate rightwards, and if you set the Anchor property to "Top, Right" the control will animate leftwards:
[ Register or Signin to view external links. ]
Useful Properties & Events
The AutomaticUpdater has quite a few useful events and properties. In particular, the "ClosingForInstall" property and the "ClosingAborted" event are especially useful.
The AutomaticUpdater install updates on 2 conditions. Either the user specifically click "Install updates now" or your application starts and there are updates ready to be installed. In this 2nd case the AutomaticUpdater control sets its "ClosingForInstall" property to "true".
Here's an example of using the "ClosingForInstall" property in the Form's constructor:
C#:
VB.NET:
However, if the update isn't ready to install (because it was corrupted, deleted, or otherwise), the closing of your application will be aborted and the "ClosingAborted" event will be called. You can use this event to load files that you previously skipped in the constructor:
C#:
VB.NET:
You need to add the AutomaticUpdater control to your Visual Studio Toolbox. Do this by right clicking the Toolbox, selecting "Choose Items...", and browsing for the AutomaticUpdater.dll.
[ Register or Signin to view external links. ]
Then simply choose the correct AutomaticUpdater.dll for your app. There are 2 separate builds of the AutomaticUpdater: one for .NET 2.0, 3.0, and 3.5 apps and one for .NET 4.0 apps.
For .NET 2.0, 3.0, and 3.5
If your app is compiled for .NET 2.0, 3.0, or 3.5 then use AutomaticUpdater.dll located in the "AutomaticUpdater" folder:
C:\Program Files\wyBuild\AutomaticUpdater\AutomaticUpdater.dll
or
C:\Program Files (x86)\wyBuild\AutomaticUpdater\AutomaticUpdater.dll
For .NET 4.0
If your app is compiled for .NET 4.0 then use AutomaticUpdater.dll located in the "AutomaticUpdater\Microsoft .NET 4.0" folder:
C:\Program Files\wyBuild\AutomaticUpdater\Microsoft .NET 4.0\AutomaticUpdater.dll
or
C:\Program Files (x86)\wyBuild\AutomaticUpdater\Microsoft .NET 4.0\AutomaticUpdater.dll
Drag the AutomaticUpdater control to your .NET app
Now drag the AutomaticUpdater control to your main form.
[ Register or Signin to view external links. ]
Finishing touches
Check for update menu
Add a "Check for updates" menu to your form:
[ Register or Signin to view external links. ]
Then associate the menu item with the AutomaticUpdater control.
If you're using a MainMenu: set the MenuItem property of the AutomaticUpdater.
If you're using a MenuStrip: set the ToolStripItem property of the AutomaticUpdater.
Set the GUID
Also generate a GUID (Globally Unique ID) for the AutomaticUpdater control by clicking the ellipsis button.
[ Register or Signin to view external links. ]
Anchor
Lastly, you can change the way the AutomaticUpdater control animates to show more information by setting the Anchor property on the control:
[ Register or Signin to view external links. ]
If you set the Anchor property to be "Top, Left" the AutomaticUpdater control will animate rightwards, and if you set the Anchor property to "Top, Right" the control will animate leftwards:
[ Register or Signin to view external links. ]
Useful Properties & Events
The AutomaticUpdater has quite a few useful events and properties. In particular, the "ClosingForInstall" property and the "ClosingAborted" event are especially useful.
The AutomaticUpdater install updates on 2 conditions. Either the user specifically click "Install updates now" or your application starts and there are updates ready to be installed. In this 2nd case the AutomaticUpdater control sets its "ClosingForInstall" property to "true".
Here's an example of using the "ClosingForInstall" property in the Form's constructor:
C#:
public Form1()
{
InitializeComponent();
// only load files, etc. when NOT closing to install an update
if (!automaticUpdater.ClosingForInstall)
{
// load important files, etc.
// LoadFilesEtc();
}
}
VB.NET:
Public Sub New()
InitializeComponent()
' only load files, etc. when NOT closing to install an update
If Not automaticUpdater.ClosingForInstall Then
' load important files, etc.
' LoadFilesEtc()
End If
End Sub
However, if the update isn't ready to install (because it was corrupted, deleted, or otherwise), the closing of your application will be aborted and the "ClosingAborted" event will be called. You can use this event to load files that you previously skipped in the constructor:
C#:
private void automaticUpdater_ClosingAborted(object sender, EventArgs e)
{
// your app was preparing to close
// however the update wasn't ready so your app is going to show itself
// LoadFilesEtc();
}
VB.NET:
Private Sub automaticUpdater_ClosingAborted(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles automaticUpdater.ClosingAborted
' your app was preparing to close
' however the update wasn't ready so your app is going to show itself
' LoadFilesEtc()
End Sub
After adding the AutomaticUpdater to your app, try checking for updates within your app. It should say you're all up to date:
[ Register or Signin to view external links. ]
Step 6: First update
Add your first version files
If you haven't already done so, you'll need to add the files for your first version of your app to wyBuild. wyBuild only references files from disk it does not store your files for you, which means this involves 3 steps:
Create a folder to store the files for this first version that includes wyUpdate (in this example we call it version 1.1).
Copy all of the files from version 1.1 of your app into this folder.
Drag all the files into wyBuild from inside this "1.1" folder you just copied.
Add your new version files
Now that you've added the first version of your app into wyBuild we need to do the similar process for the next version (let's call it version 1.2):
Create a folder to store the files for this new version (we're calling it 1.2).
Copy all of the files from version 1.2 of your app into this folder.
Click the "new version" tab in wyBuild:
Drag all the files into wyBuild from inside this "1.2" folder you just copied.
Re-build wyUpdate
We're going to re-build wyUpdate. As you'll notice this re-built version will be for inclusion with version 1.2 of your app (as opposed to before, when you built wyUpdate for version 1.1 of your app).
Build your updates
In the steps above you added all the files from two version of your app (we're calling them 1.1 and 1.2). Now when you click "Build update" button, wyBuild will dynamically scan the files on disk and generate small patches for you.
Upload the updates to your server
Click the "Upload updates" button to upload your newly created update files. Now your users will be able to update to the new version of your app.
(Optional) Testing the update
If you want to test the update process you'll need to do 2 things:
Make a duplicate of your "1.1" version of your app (including the "client.wyc" and "wyUpdate.exe" files).
Run your app (if you're using the AutomaticUpdater) or just run wyUpdate.exe (if you're using it as a standalone updater).
Note: You don't want to test updating over your original files. Always make a copy of the folder to do the testing.
(Optional) Build your new installer
When you're building your installer, include all of your app files and folders along with the newly re-built "wyUpdate.exe" and "client.wyc" for version 1.2 of your app.
Credit Goes To: http://wyday.com/wybuild/help/walkthrough.php
Last edited by Nathanael ; edited 1 time in total
#2. Posted:
Status: Offline
Joined: Mar 26, 201113Year Member
Posts: 360
Reputation Power: 18
Status: Offline
Joined: Mar 26, 201113Year Member
Posts: 360
Reputation Power: 18
has anyone used this or found it helpful?
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Jan 24, 201014Year Member
Posts: 1,478
Reputation Power: 106
Status: Offline
Joined: Jan 24, 201014Year Member
Posts: 1,478
Reputation Power: 106
#4. Posted:
Status: Offline
Joined: May 08, 201113Year Member
Posts: 699
Reputation Power: 28
Status: Offline
Joined: May 08, 201113Year Member
Posts: 699
Reputation Power: 28
#5. Posted:
Status: Offline
Joined: Mar 26, 201113Year Member
Posts: 360
Reputation Power: 18
Status: Offline
Joined: Mar 26, 201113Year Member
Posts: 360
Reputation Power: 18
-Derp wrote Please give credit the next time you copy and paste a tutorial.
[ Register or Signin to view external links. ]
sorry, i was just trying to help people and get this way of adding an updater to your application more known. and i didnt exaclty copy and paste it. when i have to download 20 pictures from there website and upload them on tinypic i wouldnt really count that as copying and pasting. i did rewrite some sentences so that it would make more sense to the person using this tutorial, but anyway i do agree with you i should have given credit to [ Register or Signin to view external links. ]
if you look at the bottom of my original post it now has this site listed.
Thanks
Last edited by Nathanael ; edited 1 time in total
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Oct 04, 201014Year Member
Posts: 1,375
Reputation Power: 54
Status: Offline
Joined: Oct 04, 201014Year Member
Posts: 1,375
Reputation Power: 54
You are viewing our Forum Archives. To view or take place in current topics click here.