C# Launcher & Updater

Credit for base: Matt

CUPLA - Game Updater & Launcher

Features:

  • Updates Game
  • Launches Game
  • Show Server Status
  • Background Music
  • Shows Client Version
  • Website button - Launches Game Website
  • Editable Layout

Screenshots

!

HOW TO USE:

! # Indexer.exe
To utilize this system, you need to have a working file server. Designate one folder in your file server for containing the first version, and updates for your software. Place the Indexer.exe inside this folder. For this runthrough, I will use C:/WebHost/Updates/ as this folder. Now create a folder with a low revision number as the name like “0.0”. Place all the folders and files for your first revision in that folder. For every update that you provide for your software, create a new folder with a higher revision number. Place all the files you changed since the last update in this new folder structured in the same way. Then run Indexer.exe.
! To give you some visual aid, look at these photos. This is the Updates folder with the base revision in /0.1/, and all updates in the remaining folders.
!
! As I have no software to give you an example with, I’ll use some simple files. Assume my software was an image contained in a folder called Data/Graphics/ called Guy.png and a song called Song.m4a. In my 0.1 folder, it should look like this.
!
! In my other patch files, I have a few changes that I made. I changed the file Song.m4a to a different song under the same name, I changed the file Guy.png to a different image under the same name, and I added a file called Song.mp3. Since I’ve uploaded a few patches, I need to run my Indexer.exe so that these patches take effect.
!
! The Indexer takes into account all folders and files that are created, and stores all their revisions and path names into their respective files. It is very important that you run the Indexer after uploading any patch so that people who run the Updater will get the updates. It is also very important that you leave the folder where your updates are contained very clean. Otherwise, your clients might download files you didn’t intend.
! After you run the Indexer, you’re all done on the server end.
! # Updater / Editor
Should be simple to figure out , if need any help let me know

Download

! CUPLA 3.0 EDITABLE

OLD POST CONTENT

! NEWEST VERSION DOWNLOAD
! CUPLA 3.0 EDITABLE DOWNLOAD Link
If i miss anything or something not working let me know
DOWNLOAD LINK AT THE BOTTOM /
GITHUB LINK https://github.com/Reflow1319/File-Updater
! I found Matt updater, it’s really great tool but it console base so it’s not useable for release games , also it just updates the game , it cant launch the game.
! So i took the source and made it into an application.
! i consider this a beta version i guess , will add any features that people want.
! i will also be willing to customize the layout to fit peoples games 
for those that cant for a low price of $10 
the changelog is being display via an html file so i will also make a custom html+css page that will match your game also, the server features is server via a php file
! Features:
Updates games duh 😄
Launch Game
Server online/offline status
Status of the launcher
Progress bar and file counter
Client version
! Whats Coming
what ever you guys request or anything i can think of 
! Making a Layout Editor so you will not need Visual studio to change the launcher layout
also making a simple settings editor 
Screenshot

! New Version DOWNLOAD AT TOP

!
! HOW TO USE:

! # Indexer.exe
To utilize this system, you need to have a working file server. Designate one folder in your file server for containing the first version, and updates for your software. Place the Indexer.exe inside this folder. For this runthrough, I will use C:/WebHost/Updates/ as this folder. Now create a folder with a low revision number as the name like “0.0”. Place all the folders and files for your first revision in that folder. For every update that you provide for your software, create a new folder with a higher revision number. Place all the files you changed since the last update in this new folder structured in the same way. Then run Indexer.exe.
! To give you some visual aid, look at these photos. This is the Updates folder with the base revision in /0.1/, and all updates in the remaining folders.
!
! As I have no software to give you an example with, I’ll use some simple files. Assume my software was an image contained in a folder called Data/Graphics/ called Guy.png and a song called Song.m4a. In my 0.1 folder, it should look like this.
!
! In my other patch files, I have a few changes that I made. I changed the file Song.m4a to a different song under the same name, I changed the file Guy.png to a different image under the same name, and I added a file called Song.mp3. Since I’ve uploaded a few patches, I need to run my Indexer.exe so that these patches take effect.
!
! The Indexer takes into account all folders and files that are created, and stores all their revisions and path names into their respective files. It is very important that you run the Indexer after uploading any patch so that people who run the Updater will get the updates. It is also very important that you leave the folder where your updates are contained very clean. Otherwise, your clients might download files you didn’t intend.
! After you run the Indexer, you’re all done on the server end.
! # Updater.exe
First you must upload all the files form the indexer to your webhost
! Now There is are a few txt files that will need to be edited 
Host.txt = This is where you put the link to your webhost directory with your updates
Revision.txt = This file just keep track of client version, for release this file should have a 0
Settings

>! --0 name of your game exe file --
client.exe
--2 Message if game client exe cant be found --
Try to Update or redownload the game installer
--4 Changelog link --
http://webhost.com/index.html
--6 name of the application --
GAME UPDATER
--8 online link to php file --
http://webhost.com/status.php
>! ```
New Link will be up after new years 
**[OLD DOWNLOAD Link](http://xeron.co/CUPLA.zip)**
**[NEW CUPLA 3.0 EDITABLE DOWNLOAD Link](https://mega.nz/#!UJpSjDxI!EXuYk08xJwUVE95RAxir0DMUjogGzCRM7jIStdQvkfw)** 
>! **NEW Versoin 4.0: [CUPLA4.0](https://xeron.co/download/CUPLA4.zip)**

I like the look of it 🙂 but it’s confusing to me that there’s a Play and Update button, does Play get disabled if there are updates and re-enabled after the updates?

Thanks glad you like it

Currently the two button are independent of each other , so if you click the play button it will load the game even if its not updated, but i guess i make the the updater check to see if there is an update and have the button reflect that , and then i will change the second button to be a link to the game website

I’m glad you found the base-project useful! But I don’t really like how you’re taking something open source, plopping a simple UI on it, and asking people to pay you to change a few images just because they don’t have access to the source. You’re more than free to do it though. Also, +1 for copy and pasting my repo’s README.

I’d also like to chip in, That Matt’s updater/launcher is well worth working with as I use a custom version from Matt myself for my project. I’d also like to suggest open sourcing it as an expansion on Matt’s.

i will also be willing to customize the layout to fit peoples games
for those that cant for a low price of $10

Can’t really customize something when it’s compiled :p.

I’d choose Matt’s over any open source one either way :).

@‘BeNjO’:

I’d also like to chip in, That Matt’s updater/launcher is well worth working with as I use a custom version from Matt myself for my project. I’d also like to suggest open sourcing it as an expansion on Matt’s.

i will also be willing to customize the layout to fit peoples games
for those that cant for a low price of $10

Can’t really customize something when it’s compiled :p.

I’d choose Matt’s over any open source one either way :).

Yea i am going to branch matt github repo, i never use it so i will post the link once i set it up 😄

for the customize , i will be editing the source for people who don’t want to do it or cant

how do i customize the look of it?


@'Orake:

how do i customize the look of it? NVM*******

@'Orake:

how do i customize the look of it?


@'Orake:

how do i customize the look of it? NVM*******

the version that is customizable has not been uploaded , i will upload within a few minutes it be called CUPLA V3 EDITABLE

The File been updated check first post

all i see is old download link

i love this lancher thank you so much

@'Orake:

i love this lancher thank you so much

Great that you like it 😄

I want to make this user friendly , so any suggestion are welcome.

Also i clean up the first post

I click update and it says Done instantly, no files have gone into my folder though.

What is the dbz game that it’s setup with?

I fixed my error - However when I hit update I get this error.

http://prntscr.com/9jodpg

@‘Essence’:

I fixed my error - However when I hit update I get this error.

http://prntscr.com/9jodpg

ok when you get the error click on details and copy it and paste here so i can see whats wrong

@‘whitespirits’:

What is the dbz game that it’s setup with?

it’s a game i am working on

A shame you didn’t release the source code…would’ve made things a bit easier.

Oh well, I can have it decompiled fairly accurately. In order of what I encountered:

  • Please don’t parse the GUI file like that…you can natively serialise/deserialise XML with .NET* Use WebClient.DownloadFile(Async) to handle downloading your files instead of titting around with Streams and DataBuffer.* Don’t use TcpClient to simulate a connection test. .NET has the Ping class (http://stackoverflow.com/questions/11800958/using-ping-in-c-sharp)* If you’re in need of async functionality, look up TaskFactory (Looks like you’re using .NET 4.5, so Task.Run())* Music is silly. It’s an updater.* Storing a separate integrity file for folders and files is silly. Just store files and create directories based on the files going in, if it already exists, it’ll carry on as normal.* More DataBuffer ickiness. Have your file list serialised to XML! Makes things much easier.* Thread.Sleep(). grates teeth. If you need form elements updated and displayed while doing work, you invoke them in a separate thread. Making my CPU spin needlessly for an updater is not exactly…great.* Actually, this whole downloading routine entirely. Use DownloadFileAsync and use the progress changing and completing events to progress things. Makes keeping your form responsive much more easier.

    EDIT: As far as the error goes, it looks like you’re using a character that the Windows filesystem does not allow.

Xam do u have Skype bro? I can really help with dbz game 🙂

@‘Xam’:

@‘Essence’:

I fixed my error - However when I hit update I get this error.

http://prntscr.com/9jodpg

ok when you get the error click on details and copy it and paste here so i can see whats wrong

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at System.IO.Directory.CreateDirectory(String path)
   at ODBS_Updater.Form1.up_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.100.0 built by: NETFXREL2STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
–--------------------------------------
ODBS Updater
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Bradley/Desktop/New%20folder%20(6)/Game%20Launcher/updater.exe

System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.81.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.81.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.91.0 built by: NETFXREL2STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.81.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.81.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.81.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.81.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration></configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Sorry for late replay , i am on vacation 😄
so this happens when you click on the update button correct ?

if so make sure your url has / at the end like so ex (http://domain.com/update/)

now if that’s not the problem if its the music button , then check that its a wav file and you put the right name on editor ,

also if you open the setting.txt and paste it here so i can check it out

I’m still unsure how to use this?
Is there anyway you can contact me?

Log in to reply