VB.NET Updater

Started by crzyone9584, March 18, 2010, 06:36:35 pm

Previous topic - Next topic

crzyone9584

March 18, 2010, 06:36:35 pm Last Edit: March 19, 2010, 02:30:23 pm by crzyone9584
RMX-OS AUL - VB.NET Edition
Authors: crzyone9584
Version: 0.2
Type: Auto Updater/Patcher
Key Term: VB.NET



Introduction
Downloads and installs updates like C# edition with a few tweaks.


Features


  • Downloads and install updates.
  • Shows a news/notice page - 0.2 Took this away. Was having problems with it.
  • Easy to use
  • Error handling - Still working on some error events
  • Ability to install any where on users computer.
  • 12-Hour clock instead of 24-Hour clock
  • All message boxes are now added to the ListBox



Screenshots

Version - 0.1: ShowHide

Version - 0.2: ShowHide




Demo

Download Here!
Mirror 1


Script

Everything is in the demo.


Instructions

Instructions are in the comments of the program.

For the ver.txt it is formated as the following:

1.0.0.0 would be 1000 in the ver.txt
1.4.0.0 would be 1400 in the ver.txt

And so forth.

Replace all yoursite.com with your sites URL.

Name your update mygame and zip it up. So it will be mygame.zip


Compatibility

You will need the .NET framework 3.5
Need to make sure that ICSharpCode.SharpZipLib.dll is with the program. Or it will not unzip your zip folder and give you errors.
You will also need a file host that allows direct/hot linking to files.


Credits and Thanks


  • EDWARDTHEFMA - Orginal poster and creator of C# Edition
  • WATERRATJ - Orginal creator of C# Edition
  • jcinsider - Saw percent complete on his pkmn Neon Updater.



Author's Notes/Planned Updates
I will not accept any PM's on this system/program. Updates will come when I have time.

I removed the IE web browser. It was causing to many problems.
Bytes received compared to total amount was changed to percent completed. The bytes received/bytes total size was causing some crashing issues.
Better error handling was not added. Decided to stabilize the program first. This is why its an update but a visual downgrade. I will add the web browser
Code is restructured and more organized. Useless code is now eliminated. 

License Info

WhiteRose

Nice, crzy, though might I suggest you fix the grammar error that can be seen in the screenshot?
(Should be "you're," not "your.")

crzyone9584

Quote from: Flower Lady WhiteRose on March 18, 2010, 06:37:57 pm
Nice, crzy, though might I suggest you fix the grammar error that can be seen in the screenshot?
(Should be "you're," not "your.")


You are correct. I know I have some things that slipped by me. I've been working on making it work in vb.net. Although the converter did most of the work. I had to rework the entire checking for updates though. Now to figure out how update the updater so that you can change the layout once in a while. I know it won't over write files when they are in use. But that can be done later. Rather fix up the errors I have now.

Blizzard

Oh lol! I already made an in-game updater plugin for RMX-OS and now this. xD I just can't release the auto-updater yet.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

crzyone9584

March 19, 2010, 03:32:53 am #4 Last Edit: March 19, 2010, 03:40:53 am by crzyone9584
Quote from: Champion Blizzard on March 19, 2010, 02:40:49 am
Oh lol! I already made an in-game updater plugin for RMX-OS and now this. xD I just can't release the auto-updater yet.


Wait when did this happen? If I knew you where going to make an in-game updater I wouldn't of done this. Then again it is still a great way to learn on how to download files and update other things.

I'm going to take out the web browser. I really don't like it. And I'm going to re do the structure and have it auto download the ver.txt so you don't have to click check for updates.

Bytes will be switched to Megabytes so it wont show 19098 for 19.10 megs. Also will be added a percent on the progress bar.

Blizzard

About a month ago. I don't remember mentioning it, though.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

crzyone9584

March 19, 2010, 01:12:07 pm #6 Last Edit: March 19, 2010, 02:41:41 pm by crzyone9584
I was gonna say i didn't  read anything about it. So is your updater all in ruby then?

Version 0.2 is out. With this update there was a visual downgrade. The web Browser component was deleted. It was causing problems. It will be added again. Just wont use I.E. Also there was some useless code that was deleted. The structure of the entire program was re-worked. The design is to the original c#. Support for graphics was taken out but will be added and all you will have to do is change the image file. The image will not be hard coded. As in the form loader event will load an image file which will be the background. Will add the ability to save on download time and use a more logical update system. Instead of having one zip that you have to update multiple times. Idea came from jcinsider's updater. Breaks the updates down into sprites, sounds, Game data, images. Not sure how I will implement this yet. But I think of a way.

As blizzard said above me he has made an offcial RMX-OS updater, which is not released yet. Once it is released I suggest you use that one instead of this.

Blizzard

Not just in Ruby, you use it as RMX-OS server extension. You simply run the client which checks the server for the version and then the server starts sending the files that need to be updated. I remember that I had problems during development which involved sending big files, etc. That resulted to higher stability in RMX-OS 1.09 (or was it 1.08?) since I discovered a small structural flaw because of that. ^_^

I created a simple format for file updates. Here are the descriptions from the instructions.

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Versioning for RMX-OS by Blizzard
# Version: 1.0
# Type: RMX-OS Add-on
# Date: 5.2.2010
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#  This script is to be distributed under the same terms and conditions like
#  the script it was created for: RMX-OS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
#   This script must be placed below RMX-OS and requires RMX-OS v1.08 or
#   higher to work properly. It is able to update the game client connecting
#   to the server to the newest game version.
#   
#   
# Instructions:
#   
#   The server extension validates the game version from the client and if the
#   client game version is lower than the server game version, the server will
#   refuse a connection. Instead the server will notify the client that it is
#   possible to update. After the player has confirmed that he wants to update
#   the client, the server will initiate version updating of the server. For
#   the server to know which files need to be sent, you need to create version
#   log files.
#   
#   
# Version Logs:
#   
#   The version log files on the server have a simple format. Each file is
#   named like "NUMBER.txt" where NUMBER is the version.
#   
#   examples:
#     
#     10.txt - version log for updating from version 9 to 10
#     15.txt - version log for updating from version 14 to 15
#     5475685.txt - version log for updating from version 5475684 to 5475685
#     
#   Version log files have a specific format that allows you to define which
#   files need to be updated. The basic format is:
#     
#     :COMMAND
#     FILES
#   
#   The following commands are at your disposal:
#     
#     file - update a single file
#     dir - update an entire directory with all subdirectories recursively
#     delete - delete a file OR a directory with all subdirectories recursively
#   
#   When using the ":delete" command, the FILES parameter is the name of the
#   file or directory that is affected.
#   When using the ":file" or the ":dir" command, there are 2 FILES parameters.
#   The first is the source file path and the second the destination file path.
#   You can add many files as you want with one single command.
#   
#   example:
#     
#     :file
#     versions/24/Game.rgssad
#     Game.rgssad
#     versions/Fonts.zip
#     fonts/fonts.dat
#     :dir
#     versions/24/BGM
#     Audio/BGM
#     :delete
#     utils/screenshot.dll
#     game.ico
#     artwork
#     :dir
#     versions/24/Audio/ME
#     Audio/ME
#     
#   The example above will do following:
#     
#     1. The file "versions/24/Game.rgssad" from the RMX-OS root directory will
#        be transferred to the client and store in the file "Game.rgssad" in
#        his game's root directory.
#     2. The file "versions/Fonts.zip" from the RMX-OS root directory will be
#        transferred to the client and stored in the file "fonts/fonts.dat" in
#        his game's root directory.
#     3. The directory "versions/24/BGM" and all of its contents (recursively)
#        from the RMX-OS root directory will be transferred to the client and
#        store in the directory "Audio/BGM" in his game's root directory.
#     4. The file or directory "utils/screenshot.dll" will be deleted.
#     5. The file or directory "game.ico" will be deleted.
#     6. The file or directory "artwork" will be deleted.
#     7. The directory "versions/24/Audio/ME" and all of its contents
#        (recursively) from the RMX-OS root directory will be transferred to
#        the client and stored in the directory "Audio/ME" in his game's root
#        directory.
#   
#   
# Notes:
#   
#   - There is not syntax checking or other verification of your version log
#     files. It is recommended not to use batch processing with one command but
#     use a command for every single file or directory.
#     
#     example:
#     
#       Instead of this type of writing:
#       
#       :file
#       versions/24/Game.rgssad
#       Game.rgssad
#       versions/Fonts.zip
#       fonts/fonts.dat
#     
#       use this type of writing:
#       
#       :file
#       versions/24/Game.rgssad
#       Game.rgssad
#       :file
#       versions/Fonts.zip
#       fonts/fonts.dat
#       
#   - Make sure to update the client scripts each time because you need to
#     update the constant GAME_VERSION in the configuration of this script to
#     make sure the client knows it's up to date.
#   - Update is done only all at once. First all files are downloaded into a
#     temporary directory. After a successful download of ALL files, first the
#     files and directories that need to be delete are deleted, then the
#     downloaded files are moved into the actual game's directory and are
#     updated.
#   - Multiple version updates work one after another, as if the client has
#     updated to one version, then restarted the game to update to the next,
#     etc. but all updates are done at once. If one version update fails for
#     some reason, the previous updates will not be lost.
#   - It is recommended to keep version updates small.
#   
#   
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

crzyone9584

I have made  really sad video. I'm just getting over cold. But it does get the point across on how to use this. whitespirits ws confused and I promised I'd make this today.

http://www.youtube.com/watch?v=oyLj7bTp4jk