autoupdate progress

This commit is contained in:
rusefi 2020-06-07 00:12:49 -04:00
parent 16dffa64fa
commit b500b1acf0
3 changed files with 16 additions and 1 deletions

View File

@ -6,6 +6,8 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Date;
@ -33,6 +35,14 @@ public class Autoupdate {
}
private static void startConsole(String[] args) {
try {
// we want to make sure that files are available to write so we use reflection to get lazy class initialization
Class mainClass = Class.forName("com.rusefi.Launcher");
Method mainMethod = mainClass.getMethod("main", args.getClass());
mainMethod.invoke(null, new Object[] {args});
} catch (ClassNotFoundException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
System.out.println(e);
}
}
private static UpdateMode getMode() {

View File

@ -2,7 +2,7 @@
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
<headerType>gui</headerType>
<jar>rusefi_autoupdate.jar</jar>
<jar></jar>
<outfile>c:\stuff\rusefi\misc\console_launcher\rusefi_autoupdate.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
@ -14,6 +14,11 @@
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>c:\stuff\rusefi\misc\console_launcher\favicon.ico</icon>
<classPath>
<mainClass>com.rusefi.autoupdate.Autoupdate</mainClass>
<cp>rusefi_console.jar</cp>
<cp>rusefi_autoupdate.jar</cp>
</classPath>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>