Simple Game Updater

I wanted to try something with JavaFX, so I made a small game launcher that updates the game jar.

Setup:

  • progress.css (in the same package as the Updater.class file)
.progress-bar { 
	-fx-padding-top: 10px;
	-fx-margin: auto;
}

.root { 
	-fx-margin: auto;
}

.green-bar  { 
	-fx-accent: green;  
}
  • version.properties (in the game directory)
#
#Mon Jan 26 19:33:28 EST 2015
version=1.0
  • version.html (on the update server)
1.0
  • version-1.0.jar (on the update server)

Every launch it checks if the file version on version.html matches the local version and if it doesn’t then it updates the game jar. After this it just launches the game.jar output file

The variable [icode]updateServerUrl[/icode] simply is the url for the directory where version.html and the version jar files are.

Launcher source: http://pastebin.java-gaming.org/b7d505a981019

Just thought I should post it in case anybody was interested :slight_smile: