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

@ -22,7 +22,7 @@ import javafx.application.Platform;
import javafx.concurrent.Task;
import javafx.stage.FileChooser;
import nsusbloader.MediatorControl;
import nsusbloader.ModelControllers.LogPrinter;
import nsusbloader.ModelControllers.ILogPrinter;
import nsusbloader.NSLDataTypes.EMsgType;
import nsusbloader.COM.Helpers.NSSplitReader;
import org.usb4java.DeviceHandle;
@ -69,7 +69,7 @@ class GoldLeaf extends TransferModule {
// For using in CMD_SelectFile with SPEC:/ prefix
private File selectedFile;
GoldLeaf(DeviceHandle handler, LinkedHashMap<String, File> nspMap, Task<Void> task, LogPrinter logPrinter, boolean nspFilter){
GoldLeaf(DeviceHandle handler, LinkedHashMap<String, File> nspMap, Task<Void> task, ILogPrinter logPrinter, boolean nspFilter){
super(handler, nspMap, task, logPrinter);
final byte CMD_GetDriveCount = 1;