Class Launcher
- java.lang.Object
-
- Launcher
-
public class Launcher extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJAR_REPO_DIRstatic java.lang.StringJAR_REPO_TXTprivate static java.lang.StringURL_TO_LATEST_GOSU_RELEASE
-
Constructor Summary
Constructors Constructor Description Launcher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static booleanaddGosuJarsToLoader()private static voidaddRepoJarPaths(java.io.File appRepo)private static java.io.FilecacheJars(java.lang.String jarLoc)static voidcopy(java.io.InputStream in, java.io.OutputStream out)(package private) static voiddeleteDir(java.io.File fileOrDirectory)private static voidextractGosu(java.net.URL url, java.io.File to, javax.swing.ProgressMonitor progress)private static java.io.FilefindRecentGosu()private static java.lang.StringgetAppName(java.lang.String jarLoc)private static java.util.List<java.io.File>getGosuJars(java.io.File gosuInstallDir)private static java.lang.StringgetHomeDir()private static java.io.FilegetRecentFile()private static java.lang.StringgetRepoJarPaths(java.io.File appRepo)private static voidinstallGosu()private static booleanisAlreadyCached(java.io.File repoTextFile)private static voidlaunchGosuMain(java.util.List<java.lang.String> args)static voidmain(java.lang.String[] args)private static java.io.FilemakeAppRepoDir(java.lang.String jarLoc)private static java.lang.StringmaybeRemoveAppendage(java.lang.String appName)private static voidwriteRecentGosuFile(java.lang.String dirName)
-
-
-
Field Detail
-
JAR_REPO_DIR
public static final java.lang.String JAR_REPO_DIR
- See Also:
- Constant Field Values
-
JAR_REPO_TXT
public static final java.lang.String JAR_REPO_TXT
- See Also:
- Constant Field Values
-
URL_TO_LATEST_GOSU_RELEASE
private static final java.lang.String URL_TO_LATEST_GOSU_RELEASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
launchGosuMain
private static void launchGosuMain(java.util.List<java.lang.String> args) throws java.lang.Exception- Throws:
java.lang.Exception
-
addGosuJarsToLoader
private static boolean addGosuJarsToLoader() throws java.lang.Exception- Throws:
java.lang.Exception
-
getGosuJars
private static java.util.List<java.io.File> getGosuJars(java.io.File gosuInstallDir)
-
installGosu
private static void installGosu()
-
extractGosu
private static void extractGosu(java.net.URL url, java.io.File to, javax.swing.ProgressMonitor progress) throws java.lang.Exception- Throws:
java.lang.Exception
-
writeRecentGosuFile
private static void writeRecentGosuFile(java.lang.String dirName) throws java.io.IOException- Throws:
java.io.IOException
-
getHomeDir
private static java.lang.String getHomeDir()
-
findRecentGosu
private static java.io.File findRecentGosu()
-
getRecentFile
private static java.io.File getRecentFile()
-
getRepoJarPaths
private static java.lang.String getRepoJarPaths(java.io.File appRepo)
-
addRepoJarPaths
private static void addRepoJarPaths(java.io.File appRepo) throws java.lang.Exception- Throws:
java.lang.Exception
-
cacheJars
private static java.io.File cacheJars(java.lang.String jarLoc) throws java.io.IOException- Throws:
java.io.IOException
-
deleteDir
static void deleteDir(java.io.File fileOrDirectory)
-
isAlreadyCached
private static boolean isAlreadyCached(java.io.File repoTextFile) throws java.io.IOException- Throws:
java.io.IOException
-
makeAppRepoDir
private static java.io.File makeAppRepoDir(java.lang.String jarLoc)
-
getAppName
private static java.lang.String getAppName(java.lang.String jarLoc)
-
maybeRemoveAppendage
private static java.lang.String maybeRemoveAppendage(java.lang.String appName)
-
copy
public static void copy(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
-