use of org.phoenicis.engines.dto.EngineDTO in project POL-POM-5 by PlayOnLinux.
the class EnginesController method installEngine.
private void installEngine(EngineDTO engineDTO, Consumer<Exception> errorCallback) {
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
interactiveScriptSession.eval("include([\"Functions\", \"Engines\", \"" + engineDTO.getCategory() + "\"]);", ignored -> interactiveScriptSession.eval("new Wine()", output -> {
final ScriptObjectMirror wine = (ScriptObjectMirror) output;
wine.callMember("install", engineDTO.getCategory(), engineDTO.getSubCategory(), engineDTO.getVersion(), engineDTO.getUserData());
}, errorCallback), errorCallback);
}
use of org.phoenicis.engines.dto.EngineDTO in project POL-POM-5 by PlayOnLinux.
the class EnginesController method deleteEngine.
private void deleteEngine(EngineDTO engineDTO, Consumer<Exception> errorCallback) {
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
interactiveScriptSession.eval("include([\"Functions\", \"Engines\", \"" + engineDTO.getCategory() + "\"]);", ignored -> interactiveScriptSession.eval("new Wine()", output -> {
final ScriptObjectMirror wine = (ScriptObjectMirror) output;
wine.callMember("delete", engineDTO.getCategory(), engineDTO.getSubCategory(), engineDTO.getVersion(), engineDTO.getUserData());
}, errorCallback), errorCallback);
}
Aggregations