Infinity Blue

Please post all your completed software applications in here. This is for full software which you have created and wish to release and share with everyone.
13 posts Page 1 of 2
Contributors
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Infinity Blue
CodenStuff
Software Updates

Release v1.

It's been a while since I updated my original automatic file updates program "Infinity V3" and one of the problems people were having is that they kept forgetting to change the release version number inside their software and also in the file on their servers which is what made the whole thing work in order for it to check for a new version and then download the updated files.

This new version "Infinity Blue" eliminates the need to update those version numbers and lets you simply add the update code to your software and basically forget about it and you dont need to make any changes what-so-ever for the purpose of updating.

Image

All you need to do is upload your new updated files to your server and your software will automatically detect these new/updated files and download them and it will only download files that have been updated or added to the server instead of downloading all the files just for the one that is updated so it saves bandwidth as well - nice!.

All that is required is that you have web hosting with PHP support.

Inside the attached zip file are 2 files:

FileUpdates371.php - Put this file into the same directory as your software files
InfinityBlue.exe - Put this in the same directory as you main software exe file

Now lets say I have a folder on my server called "MyCoolApp" and this is where I want to store my app files so I would upload my main exe file and any folders/images/resources/dlls into the "MyCoolApp" folder and I would also upload the "FileUpdates371.php" file into the "MyCoolApp" folder. Now whenever I update my main exe or any resources/dlls I would just upload them to that folder and override the existing ones.

Now you have the files uploaded so its time to add the code into my main form_load event so it can check for updates each time its run...
Code: Select all
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
         Try
            Dim MyAppName As String = "AppName.exe"
            Dim url As String = "http://www.YOURSITE.com/Files/" & "FileUpdates371.php"
            Dim pageRequest As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
            Dim pageResponse As WebResponse = pageRequest.GetResponse()
            Dim filelist As String : Dim Mainlist As String
            Using r As New StreamReader(pageResponse.GetResponseStream())
                filelist = r.ReadToEnd
                If Not IO.File.Exists(Application.StartupPath & "\" & "Updates") Then
                    IO.File.WriteAllText(Application.StartupPath & "\" & "Updates", filelist)
                End If
                Dim sr As New StreamReader(Application.StartupPath & "\" & "Updates")
                Mainlist = sr.ReadToEnd
                Dim FileLines() As String = filelist.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
                Dim MainLines() As String = Mainlist.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
                Button1.Text = FileLines.Length & ".." & MainLines.Length
                If Not Mainlist = filelist And Not FileLines.Length < MainLines.Length Then
                    MsgBox(FileLines.Except(MainLines).Count)
                    Dim answer As DialogResult
                    answer = MessageBox.Show("An update is available. Would you like to update now?", "Software Updates", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
                    If answer = vbYes Then
                        Dim App As New Process
                        App.StartInfo.FileName = Application.StartupPath & "\" & "InfinityBlue.exe"
                        App.StartInfo.Arguments = "Update|" & MyAppName & "|" & url
                        App.Start()
                        Me.Close()
                    End If
                End If
            End Using
            If My.Computer.FileSystem.FileExists(Application.StartupPath & "\" & "InfinityBlueUpdate.exe") Then
                My.Computer.FileSystem.DeleteFile(Application.StartupPath & "\" & "InfinityBlue.exe", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
                My.Computer.FileSystem.RenameFile(Application.StartupPath & "\" & "InfinityBlueUpdate.exe", "InfinityBlue.exe")
            End If
        Catch ex As Exception
        End Try


    End Sub
Just a simple copy and paste job and now I just need to change 2 things in that code. First I change the "AppName.exe" to whatever my app exe is called and the second thing is the URL to the folder where my updated files will be stored.

So I would change the URL to: "http://www.MySite.com/MyCoolApp/" remembering to put in the trailing slash at the end.

Now whenever I run my app it will check for any updates and let me know if any are available to download.

When updates are available "Infinity Blue" will run and download all the updates for me and then restart my main app.


Finished product version 1.
InfinityBlue14022013.zip

Simple. Easy. Sweet cooll;
You do not have the required permissions to view the files attached to this post.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
Scottie1972
Codenstuff Elite
Codenstuff Elite
Posts: 953
Joined: Thu Jan 14, 2010 5:48 am

Re: Infinity Blue
Scottie1972
Awesome!
Been waiting on this one for awhile. I'll be one of the first to test it out.
Thanks #CodenStuff
Image
User avatar
smashapps
Coding Guru
Coding Guru
Posts: 961
Joined: Tue Apr 05, 2011 8:41 am

Re: Infinity Blue
smashapps
I am definitely going to use this, thanks again!
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Re: Infinity Blue
CodenStuff
I moved this topic from work in progress to full software because I think its ready and stable enough for active use.

I updated the download cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

Re: Infinity Blue
zachman61
Codenstuff, I'm surprised you haven't switched to coding in C# yet.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Infinity Blue
RunarM
zachman61 wrote:
Codenstuff, I'm surprised you haven't switched to coding in C# yet.
What is the difference between VB and C#?
Just another day in my life.
http://www.codexvideos.com
User avatar
Scottie1972
Codenstuff Elite
Codenstuff Elite
Posts: 953
Joined: Thu Jan 14, 2010 5:48 am

Re: Infinity Blue
Scottie1972
RunarM wrote:
zachman61 wrote:
Codenstuff, I'm surprised you haven't switched to coding in C# yet.
What is the difference between VB and C#?
it would be easier to tell you how they are the same.

all the Classes are highlighted in blue!
thats about it.
Image
User avatar
Skillful
Skillful Coders
Skillful Coders
Posts: 969
Joined: Tue Nov 16, 2010 10:07 am

Re: Infinity Blue
Skillful
From what I've read VB.NET doesn't support unsafe code.
Syntax is different too.
Both compile down to the same IL code though.
Instead of LOL use this -
LSIBMHBIWFETALOL

Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: Infinity Blue
Shim
RunarM wrote:
zachman61 wrote:
Codenstuff, I'm surprised you haven't switched to coding in C# yet.
What is the difference between VB and C#?
from my experience c# is kind of similar with java(syntax,classes,etc) but c# codes are alike vb.net , love them all
Find my programs on Softpedia
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Infinity Blue
RunarM
I have tried coding in C# and I didn't see any advantages - you have to write a million curly brackets and end with ;
Just another day in my life.
http://www.codexvideos.com
13 posts Page 1 of 2
Return to “Full Software”