Refactor some old UI-related code. Rewrite LogPrinter to handle commandline. Add RCM-payload module into CLI interface: now it could be executed on system without graphical environment (x86/amd64 only).

E.g.: java -jar app.jar --rcm payload.bin
This commit is contained in:
Dmitry Isaenko 2020-07-03 04:01:20 +03:00
parent 255c926184
commit 6b65c74c9d
23 changed files with 328 additions and 154 deletions

View file

@ -20,7 +20,7 @@ package nsusbloader.Utilities;
import javafx.concurrent.Task;
import nsusbloader.COM.USB.UsbErrorCodes;
import nsusbloader.ModelControllers.LogPrinter;
import nsusbloader.ModelControllers.ILogPrinter;
import nsusbloader.NSLDataTypes.EMsgType;
import org.usb4java.DeviceHandle;
import org.usb4java.LibUsb;
@ -33,7 +33,7 @@ import java.nio.charset.StandardCharsets;
import java.util.Arrays;
class NxdtUsbAbi1 {
private LogPrinter logPrinter;
private ILogPrinter logPrinter;
private DeviceHandle handlerNS;
private Task<Boolean> task;
private String saveToPath;
@ -80,7 +80,7 @@ class NxdtUsbAbi1 {
public NxdtUsbAbi1(DeviceHandle handler,
Task<Boolean> task,
LogPrinter logPrinter,
ILogPrinter logPrinter,
String saveToPath
){
this.handlerNS = handler;