Fixes #976 Now uses GitHub to retrieve most current version

Reworked whole Version Checker with an extensible interface to add any other service later on easier.
The version checker now has its own config file, to collect the different options and extract them from the main config file.
In that you can specify how fine the versions should be checked.
This commit is contained in:
thatsIch
2015-03-09 17:35:19 +01:00
parent 720b38442e
commit 6baf952904
33 changed files with 2023 additions and 169 deletions
@@ -18,6 +18,7 @@
package appeng.recipes.loader;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -25,19 +26,21 @@ import java.io.InputStreamReader;
import appeng.api.recipes.IRecipeLoader;
public class ConfigLoader implements IRecipeLoader
public final class ConfigLoader implements IRecipeLoader
{
private final File rootDirectory;
private final String rootPath;
public ConfigLoader(String s) {
this.rootPath = s;
public ConfigLoader( File rootDirectory )
{
this.rootDirectory = rootDirectory;
}
@Override
public BufferedReader getFile(String s) throws Exception
public BufferedReader getFile( String s ) throws Exception
{
File f = new File( this.rootPath + s );
final File f = new File( this.rootDirectory, s );
return new BufferedReader( new InputStreamReader( new FileInputStream( f ), "UTF-8" ) );
}
}