Browse Source

Merge pull request #13 from Seil0/dev

update to 127
pull/25/head
Jannik 5 years ago committed by GitHub
parent
commit
4ca4f7ad3a
  1. BIN
      bin/application/DBController.class
  2. BIN
      bin/application/updater.class
  3. 10
      src/application/updater.java
  4. BIN
      updates/ProjectHomeFlix.jar

BIN
bin/application/DBController.class

Binary file not shown.

BIN
bin/application/updater.class

Binary file not shown.

10
src/application/updater.java

@ -49,8 +49,9 @@ public class updater implements Runnable{
apiOutput = ina.readLine();
ina.close();
} catch (IOException e1) {
mainWindowController.showErrorMsg(mainWindowController.errorUpdateV, e1);
e1.printStackTrace();
Platform.runLater(() -> {
mainWindowController.showErrorMsg(mainWindowController.errorUpdateV, e1);
});
}
JsonObject object = Json.parse(apiOutput).asObject();
@ -89,8 +90,9 @@ public class updater implements Runnable{
pm.setMillisToPopup(0);
pm.setMinimum(0);// tell the progress bar that we start at the beginning of the stream
pm.setMaximum(conn.getContentLength());// tell the progress bar the total number of bytes we are going to read.
FileUtils.copyInputStreamToFile(pmis, new File("ProjectHomeFlix.jar"));
FileUtils.copyInputStreamToFile(pmis, new File("ProjectHomeFlix_update.jar")); //download update
org.apache.commons.io.FileUtils.copyFile(new File("ProjectHomeFlix_update.jar"), new File("ProjectHomeFlix.jar")); //TODO rename update to old name
org.apache.commons.io.FileUtils.deleteQuietly(new File("ProjectHomeFlix_update.jar")); //delete update
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
System.exit(0); //finishes itself
} catch (IOException e) {

BIN
updates/ProjectHomeFlix.jar

Binary file not shown.
Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close