Jump to content
jcsnider

JC's Game Launcher & Updater! (Easiest you'll find!)

Recommended Posts

JC's Game Launcher & Updater

v2.0

 

 

This is a very basic game updater/launcher for Intersect games and all kinds of projects in general. This updater is open source so you're free to modify it to your liking. Powered by Google drive, you create a google drive folder with your game client. When you add/remove/change files in your google drive folder, the updater will make those same changes for all of your players. 

 

Launcher Pros/Cons To Consider:

Pros:

  • Easy to setup.
  • Free
  • Open Source
  • Very easy to release updates.
  • Only downloads changed files.
  • Can resume updates if the program is restarted.
     

Cons:

  • Limited customization.
  • Windows only
  • Several setup steps, but easy if you can follow directions.
  • Likely will not be developed further!

 

 

Media:

97d2d86038aeee277b3990e903a9445f.png

 

 

Setup Steps:

Step 1 - Create Google Drive API Key

Spoiler

 

  • Visit Google Cloud Projects Console - Sign in with your Google Account
  • Click on "Select a Project" at the top of the page.
    988f78c82c0acd78e8247651933cf277.png
     
  • Click the "+" (Create Project) button in the popup window
    ac94d332637e0d837b9276ef0c2911c4.png
     
  • Give your project a name. I recommend "GameName-Updater" where you replace GameName with the name of your game. After naming your project, click "Create"
    ebd9b2ec314bb03b0ea58fa49ace6240.png
     
  • Give Google a minute or two to create the project.
     
  • Click "Select Project" at the top of your Window again
    988f78c82c0acd78e8247651933cf277.png
     
  • Click into your new project
    623f65a8606f38c5219d301700cb2f05.png
     
  • Click "APIs and Services" in the navigation menu on the left
    eda659c3f30038f02a5d1d979b106796.png
     
  • Click "Enable APIs and Services" at the top of the new page
    f9593b713ef08b87734e8979bb68223a.png
     
  • Find and click on the Google Drive API Tile
    adb3e7292b80515cd75e77d7f8ec6b2a.png
     
  • Click the big blue enable button
    df0ec8db7fcc1a9e96e87bf4ae64948f.png
     
  • Once the Google Drive API page loads, click on "Credentials" in the navigation on the left
    7f73336f44ecf0213e4ca5602153eaa8.png
     
  • On the credentials page, select the create credentials button, and then the API Key option
    0d91af9df12b71d0f6219a9159a4afc1.png
     
  • Copy the API Key somewhere safe, and close this browser window
    ed09f28e688147e248efce82ad58ae10.png
  • Congratz! This was the hardest part by far!

 

Step 2 - Setup Google Drive Project Folder

Spoiler
  • Go to Google Drive - If asked to sign in, make sure you use the same google account you used to generate the api key.
     
  • Create a new folder in Google drive. Name this folder the name of your game.
     
  • Create another folder inside the folder you just created called data. Your game's folder should look like this:
    c4b02e842c49d65c04590866cae5b6b7.png
     
  • Upload the contents of your client folder into the DATA folder. So the data folder will look like this:
    ef0a873d2c526bbced9eddc3e1b46b8e.png
     
  • Once your client files are uploaded, go to the folder titled after your game and turn link sharing on:
    0ca1591fc356f54aa34401c0f08b5c10.png
     
  • Google Drive will tell you that link sharing is ON, this is a good thing.
    e785ba5c77e70d369d968975ec62a8be.png
     
  • Finally, make sure you are still in the folder titled after your game that contains the data folder. Look at your browser URL, it should look something like this:
    https://drive.google.com/drive/folders/BBBBBBBBBBBBBBBBBBBBBBBBBBBBB
    We need to get the folder id for our updater, it is the long list of characters after /folders/. So my folder id is:
    BBBBBBBBBBBBBBBBBBBBBBBBBBBBB
     
  • Save your folder id somewhere safe, we will need it in the final step.

 

Step 3 - Configuring the Launcher

Spoiler
  • Download the Launcher at the bottom of this post.
     
  • Extract the Launcher in an empty folder on your PC. Your folder should look like this:
    e5ca0d649c4f1032f8562472c79ca6d5.png
     
  • Open settings.json in the data folder. In the json, put your folder id (from step 2)  and api key (from step 1) inside the empty quotes.  When you're done, your settings.json should look like this:
    86fd14063c002256df65a25afd63537c.png
     
  • Save the settings.json file after you enter your api key and folder id.

 

Step 4 - Test the updater!

Spoiler

Run Game Launcher.exe and it should start downloading everything in your Google Drive folder. Sometimes there is a delay between the updater seeing changes, so if no files are downloaded give it 10 minutes and try again. Once the update it done the updater will automatically launch Intersect Client.exe, or whatever application is listed in the settings.json file.

 

Step ? ? ? - Releasing Future Updates

Spoiler

To release updates, just go to your Google drive folder and add/remove/replace files. The updater will do the rest!

 

 

 

Download

Grab the latest binary and source code from Github!

https://github.com/AscensionGameDev/Game-Launcher/releases

 

Troubleshooting:

  • 7f9c65e5387031d254336ba1ef66adb0.png
    If you see the above error open AVG/Avast. Go into settings and disable Deep Scan (Avast) and Cyber Capture (AVG), then try again.

 

Customization (NEW!):

Set the launchers icon, and the icon within the app!

Spoiler

Give your Launcher an Icon! All you need is resource hacker and the .ico file of your choice!

Download Resource Hacker Here

 

Launch ResourceHacker.exe. Hit File -> Open -> and Select your Launchers .exe:

9e2add7615b1b1999c777e5b4044c137.gif

 

Click on the Add Image Resource button, then click on "Select File...".  Select your icon, and then click add resource.

862d86453c9c5529b5bef50546ccff4f.gif

 

Hit the save icon in the top left.

71792eb2b7135a08594b0d105dcb4484.png

 

Close resource hacker and go look at the final product!  (Resource hacker makes a backup of the original .exe, you can delete it now!)

8d92d3d383e33f0f2b0df5c7ee8ccc06.png

 

The icon you select will show inside the updater and in the windows taskbar too!

f9e16b01b984ae416b6796ae21a53730.png

 

c3c6cec642e216fa8bbc083f8f600b88.png

 

You're done!

 

 

Questions/Comments/Errors? 

Post below and I'll respond whenever I have time. Enjoy!

Share this post


Link to post
Share on other sites

ok i will give my opinion of this. I went through all the steps and everything went smoothly. I clicked updater.exe in the folder and first the antivirus blocks it and then windows gives error. If i ignore what the antivirus is saying after a few seconds windows gives this error and if i click the antivirus popup and say i trust this file then that window closes but windows still gives this error and i even did try running updater.exe as administrator to see if that would fix it and it didn't

antivirus.png

windowserror.png

Share this post


Link to post
Share on other sites

So the first screenshot is an overprotective antivirus doing it's job.  Sadly there is nothing that can be done about that.

 

The second screenshot looks like the updater is trying to launch your game, but I can tell by the folder in the background that it isn't there. Will you share your settings.json with me? (PM is fine.)

Share this post


Link to post
Share on other sites

ok it was just a small setting in avg antivirus that needed to be disabled but after that it is working fine without the windows error but still gotta click the antivirus popup and tell them you trust the file, i will be sure to pass that information on to players but I am wondering can I rename the updater.exe to my game name? since it automatically launches my game after grabbing updates?

Share this post


Link to post
Share on other sites

one more question on this.. now to send the updater to my players how do I do this? just upload the updater folder to google drive? which files should I include with it? BTW I created a digital signature on the updater.exe which i have now renamed to my game name so it shouldn't be getting the antivirus popups

 

EDIT: creating a digital signature didn't stop antivirus from wanting to block the file which means my player base will be 0 because nobody is going to trust installing a game where the antivirus pops up calling it unsafe. wondering how the professional games keep antiviruses from blocking their game

Share this post


Link to post
Share on other sites

If you want it to be trusted then it has to become widely popular. These various antivirus programs have to see it hundreds of thousands of times. 

 

Intersect pops up as a virus for everyone on first launch, it hasn't hurt our userbase enough for me to care about. 

 

You  might be able to contact each company individually, send them your file, and ask them to scan it and add your app to a safe list or something but I don't know if that process actually exists. 

Share this post


Link to post
Share on other sites

just want to say after playing around with this updater that the client only actually launches straight from the folder itself and will not launch if you make a shortcut on your desktop to it, and the client only launches at all from updater if the folder is on your desktop, if updater folder is in Program Files (x86) it checks for updates and then crashes

Share this post


Link to post
Share on other sites

I am using this with my installer program and the installer program is installing the folder in Program Files (x86) and the shortcut on desktop is pointing to that folder which has all the same files in it as the one on my desktop but in Program Files (x86) the program just crashes. I was kinda hoping that players would never have to see that folder and just be able to use the shortcut that will be placed on their desktop pointing to the install location in Program Files (x86) because if non dev players see that folder they will be so confused which file they are suppose to click to launch updater since there are 3 files that have same name just different endings

Share this post


Link to post
Share on other sites

Without your installer and actually seeing what's going on my best guess is that the program can't read/write to the program files (x86) program without being ran as administrator... Try right clicking on your updater and run as administrator.  If you want a more detailed answer then attach stuff for us to test.

 

 

Share this post


Link to post
Share on other sites

beautiful, that worked running the shortcut as administrator but maybe i will have the installer place the folder in documents or something to avoid players having to run it as an administrator

Share this post


Link to post
Share on other sites

New release! Version 1.1, all the library/dll files are contained INSIDE the .exe. Basically if you upgrade to this version everything will be the same except you can delete the following:

  • updater_libs folder
  • Updater.exe.config
  • Updater.pdb

 

Grab it here!

https://github.com/AscensionGameDev/Simple-Updater-GDrive/releases/tag/v1.1

Share this post


Link to post
Share on other sites

Just released Version 2.0!  Renamed the project to JC's Game Launcher!  (Or Game Launcher for short ^^)

 

Version 2.0 has a lot of nice updates to impact cleanliness!

  • The launcher.png and settings.json file no longer needs to be in the same directory with the .exe!
  • The Client and all of it's data can be in a sub directory as well!
  • I've added a quick guide on how to customize the updater so you can add your own icons!
  • You can update the launchers image now!
    • If you do this, the images is the first file downloaded and the new image is shown while everything else downloads!
    • This will work great if you use the launcher image to show off news/updates!

 

Media!:

Clean Folders! (The launcher and a data folder is all you need!)

daf770cdded7ec5d11b57aec0ef669f6.png

Look at that beautiful app icon!

6f2b483807304fd26020c25a94587bc8.png

The icon is also found in the app's title bar and windows task bar!

c3c6cec642e216fa8bbc083f8f600b88.png

 

f9e16b01b984ae416b6796ae21a53730.png

 

 

Upgrading Steps!

Sadly the launcher is not self-updating... so you need to distribute a new launcher to your players if you want this update. This update also requires some changes to how your Google Drive folder is setup.

 

If you you're already using an earlier version of my updater, and want to use Game Launcher 2.0, follow the setup guide again starting at step 2!

 

Send questions my way, and enjoy!  (Definitely want to make sure you all see this update: @Niko, @Murdoc, @Kibbelz, @PinkAngel)

Share this post


Link to post
Share on other sites
16 minutes ago, Niko said:

Nice update. No more resource hacker.

 

Ummmmmm, lol.

ee6e45b84a4f51d99a806c8f9f48aaef.png

 

But it goes a little further because the updater notices that resource hacker haxxed it and sets the form title to have resource hackers icon :P 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×