Loading src/main/java/ecorp/easy/installer/controllers/MainWindowController.java +3 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import ecorp.easy.installer.controllers.stepControllers.StepController; import ecorp.easy.installer.controllers.stepControllers.Stoppable; import ecorp.easy.installer.models.Phone; import ecorp.easy.installer.models.steps.IStep; import ecorp.easy.installer.tasks.CommandExecutionTask; import ecorp.easy.installer.tasks.CommandRunnerService; import ecorp.easy.installer.threads.ThreadFactory; import ecorp.easy.installer.utils.UiUtils; Loading Loading @@ -288,8 +289,8 @@ public class MainWindowController implements Initializable { public void setDevice(Phone device){ this.factory.changeMould(device); this.device = device; CommandRunnerService.updateCommonParam("DEVICE_ID", device.getSerialNo()); CommandRunnerService.updateCommonParam("DEVICE_DEVICE", device.getAdbDevice()); CommandExecutionTask.updateCommonParam("DEVICE_ID", device.getSerialNo()); CommandExecutionTask.updateCommonParam("DEVICE_DEVICE", device.getAdbDevice()); } /** Loading src/main/java/ecorp/easy/installer/controllers/stepControllers/CustomExecutableController.java +8 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import ecorp.easy.installer.models.steps.CustomExecutableStep; import ecorp.easy.installer.tasks.CommandRunnerService; import ecorp.easy.installer.utils.UiUtils; import ecorp.easy.installer.graphics.FlashGlobalProgressManager; import ecorp.easy.installer.models.steps.CommandExecutionResult; import ecorp.easy.installer.models.steps.IStep; import java.net.URL; import java.util.ArrayList; Loading Loading @@ -98,12 +99,16 @@ public class CustomExecutableController extends StepController<CustomExecutableS /** Initialization relatives to Executable **/ final Command cmd = step.getCommand(); backgroundService = new CommandRunnerService(cmd); backgroundService.setOnSucceeded(eh->{ boolean result = backgroundService.getValue(); if(result) CommandExecutionResult result = backgroundService.getValue(); if(result.isSuccess()) onStepEnd(); else{ String errorMsgKey = cmd.getErrorMsg(); String errorMsgKey = cmd.getErrorMsg(result.getExitCode()); if (errorMsgKey == null || errorMsgKey.isEmpty()){ errorMsgKey = "script_error_unknown"; } Loading src/main/java/ecorp/easy/installer/controllers/stepControllers/ExecutableStepController.java +4 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package ecorp.easy.installer.controllers.stepControllers; import ecorp.easy.installer.models.Command; import ecorp.easy.installer.models.steps.CommandExecutionResult; import ecorp.easy.installer.models.steps.IExecutableStep; import ecorp.easy.installer.tasks.CommandRunnerService; import java.net.URL; Loading @@ -40,11 +41,11 @@ public class ExecutableStepController extends StepController<IExecutableStep>{ backgroundService = new CommandRunnerService(cmd); backgroundService.setOnSucceeded(eh->{ boolean result = backgroundService.getValue(); if(result) CommandExecutionResult result = backgroundService.getValue(); if(result.isSuccess()) onStepEnd(); else{ String errorMsgKey = cmd.getErrorMsg(); String errorMsgKey = cmd.getErrorMsg(result.getExitCode()); if (errorMsgKey == null || errorMsgKey.isEmpty()){ errorMsgKey = "script_error_unknown"; } Loading src/main/java/ecorp/easy/installer/controllers/stepControllers/LoadStepController.java +4 −3 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import ecorp.easy.installer.models.Command; import ecorp.easy.installer.models.steps.LoadStep; import ecorp.easy.installer.tasks.CommandRunnerService; import ecorp.easy.installer.graphics.FlashGlobalProgressManager; import ecorp.easy.installer.models.steps.CommandExecutionResult; import ecorp.easy.installer.models.steps.IStep; import java.net.URL; import java.util.ResourceBundle; Loading Loading @@ -97,12 +98,12 @@ public class LoadStepController extends StepController<LoadStep> implements Stop service.setOnSucceeded(eh->{ pbTimeline.stop(); boolean result = service.getValue(); CommandExecutionResult result = service.getValue(); if(result){ if(result.isSuccess()){ onStepEnd(); }else{ String errorMsgKey = cmd.getErrorMsg(); String errorMsgKey = cmd.getErrorMsg(result.getExitCode()); if (errorMsgKey == null || errorMsgKey.isEmpty()){ errorMsgKey = "script_error_unknown"; } Loading src/main/java/ecorp/easy/installer/controllers/subcontrollers/DownloadSrcController.java +10 −0 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ package ecorp.easy.installer.controllers.subcontrollers; import ecorp.easy.installer.AppConstants; import ecorp.easy.installer.controllers.MainWindowController; import ecorp.easy.installer.tasks.CommandExecutionTask; import ecorp.easy.installer.tasks.DownloadTask; import ecorp.easy.installer.utils.UiUtils; import java.net.URL; Loading Loading @@ -120,6 +122,14 @@ public class DownloadSrcController extends AbstractSubController { preparationProgressBar.setProgress(1.0); //BUG! apparement pas accessible par le service. J'ai un "A bound value cannot be set" progressLabel.setText(i18n.getString("download_lbl_complete")); progressTitle.setVisible(false); //need to update/add CommandExecutionTask.CommonParameters at this time.. //But I'm not sure it's the best place to do that. //I don't like to add dependency to CommandExecutionTask just for that String sourcesFolderPath = AppConstants.getSourcesFolderPath(); CommandExecutionTask.updateCommonParam("TWRP_IMAGE_PATH", sourcesFolderPath+AppConstants.getTwrpImgPath()); CommandExecutionTask.updateCommonParam("ARCHIVE_PATH", sourcesFolderPath+AppConstants.getEArchivePath()); parentController.disableNextButton(false); } Loading Loading
src/main/java/ecorp/easy/installer/controllers/MainWindowController.java +3 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import ecorp.easy.installer.controllers.stepControllers.StepController; import ecorp.easy.installer.controllers.stepControllers.Stoppable; import ecorp.easy.installer.models.Phone; import ecorp.easy.installer.models.steps.IStep; import ecorp.easy.installer.tasks.CommandExecutionTask; import ecorp.easy.installer.tasks.CommandRunnerService; import ecorp.easy.installer.threads.ThreadFactory; import ecorp.easy.installer.utils.UiUtils; Loading Loading @@ -288,8 +289,8 @@ public class MainWindowController implements Initializable { public void setDevice(Phone device){ this.factory.changeMould(device); this.device = device; CommandRunnerService.updateCommonParam("DEVICE_ID", device.getSerialNo()); CommandRunnerService.updateCommonParam("DEVICE_DEVICE", device.getAdbDevice()); CommandExecutionTask.updateCommonParam("DEVICE_ID", device.getSerialNo()); CommandExecutionTask.updateCommonParam("DEVICE_DEVICE", device.getAdbDevice()); } /** Loading
src/main/java/ecorp/easy/installer/controllers/stepControllers/CustomExecutableController.java +8 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import ecorp.easy.installer.models.steps.CustomExecutableStep; import ecorp.easy.installer.tasks.CommandRunnerService; import ecorp.easy.installer.utils.UiUtils; import ecorp.easy.installer.graphics.FlashGlobalProgressManager; import ecorp.easy.installer.models.steps.CommandExecutionResult; import ecorp.easy.installer.models.steps.IStep; import java.net.URL; import java.util.ArrayList; Loading Loading @@ -98,12 +99,16 @@ public class CustomExecutableController extends StepController<CustomExecutableS /** Initialization relatives to Executable **/ final Command cmd = step.getCommand(); backgroundService = new CommandRunnerService(cmd); backgroundService.setOnSucceeded(eh->{ boolean result = backgroundService.getValue(); if(result) CommandExecutionResult result = backgroundService.getValue(); if(result.isSuccess()) onStepEnd(); else{ String errorMsgKey = cmd.getErrorMsg(); String errorMsgKey = cmd.getErrorMsg(result.getExitCode()); if (errorMsgKey == null || errorMsgKey.isEmpty()){ errorMsgKey = "script_error_unknown"; } Loading
src/main/java/ecorp/easy/installer/controllers/stepControllers/ExecutableStepController.java +4 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package ecorp.easy.installer.controllers.stepControllers; import ecorp.easy.installer.models.Command; import ecorp.easy.installer.models.steps.CommandExecutionResult; import ecorp.easy.installer.models.steps.IExecutableStep; import ecorp.easy.installer.tasks.CommandRunnerService; import java.net.URL; Loading @@ -40,11 +41,11 @@ public class ExecutableStepController extends StepController<IExecutableStep>{ backgroundService = new CommandRunnerService(cmd); backgroundService.setOnSucceeded(eh->{ boolean result = backgroundService.getValue(); if(result) CommandExecutionResult result = backgroundService.getValue(); if(result.isSuccess()) onStepEnd(); else{ String errorMsgKey = cmd.getErrorMsg(); String errorMsgKey = cmd.getErrorMsg(result.getExitCode()); if (errorMsgKey == null || errorMsgKey.isEmpty()){ errorMsgKey = "script_error_unknown"; } Loading
src/main/java/ecorp/easy/installer/controllers/stepControllers/LoadStepController.java +4 −3 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import ecorp.easy.installer.models.Command; import ecorp.easy.installer.models.steps.LoadStep; import ecorp.easy.installer.tasks.CommandRunnerService; import ecorp.easy.installer.graphics.FlashGlobalProgressManager; import ecorp.easy.installer.models.steps.CommandExecutionResult; import ecorp.easy.installer.models.steps.IStep; import java.net.URL; import java.util.ResourceBundle; Loading Loading @@ -97,12 +98,12 @@ public class LoadStepController extends StepController<LoadStep> implements Stop service.setOnSucceeded(eh->{ pbTimeline.stop(); boolean result = service.getValue(); CommandExecutionResult result = service.getValue(); if(result){ if(result.isSuccess()){ onStepEnd(); }else{ String errorMsgKey = cmd.getErrorMsg(); String errorMsgKey = cmd.getErrorMsg(result.getExitCode()); if (errorMsgKey == null || errorMsgKey.isEmpty()){ errorMsgKey = "script_error_unknown"; } Loading
src/main/java/ecorp/easy/installer/controllers/subcontrollers/DownloadSrcController.java +10 −0 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ package ecorp.easy.installer.controllers.subcontrollers; import ecorp.easy.installer.AppConstants; import ecorp.easy.installer.controllers.MainWindowController; import ecorp.easy.installer.tasks.CommandExecutionTask; import ecorp.easy.installer.tasks.DownloadTask; import ecorp.easy.installer.utils.UiUtils; import java.net.URL; Loading Loading @@ -120,6 +122,14 @@ public class DownloadSrcController extends AbstractSubController { preparationProgressBar.setProgress(1.0); //BUG! apparement pas accessible par le service. J'ai un "A bound value cannot be set" progressLabel.setText(i18n.getString("download_lbl_complete")); progressTitle.setVisible(false); //need to update/add CommandExecutionTask.CommonParameters at this time.. //But I'm not sure it's the best place to do that. //I don't like to add dependency to CommandExecutionTask just for that String sourcesFolderPath = AppConstants.getSourcesFolderPath(); CommandExecutionTask.updateCommonParam("TWRP_IMAGE_PATH", sourcesFolderPath+AppConstants.getTwrpImgPath()); CommandExecutionTask.updateCommonParam("ARCHIVE_PATH", sourcesFolderPath+AppConstants.getEArchivePath()); parentController.disableNextButton(false); } Loading