use of org.phoenicis.containers.wine.parameters.RegistryParameter in project POL-POM-5 by PlayOnLinux.
the class WinePrefixContainerController method changeSetting.
public void changeSetting(WinePrefixContainerDTO winePrefix, RegistryParameter setting, Runnable doneCallback, Consumer<Exception> errorCallback) {
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
final String registryPatch = registryWriter.generateRegFileContent(setting.toRegistryPatch());
LOGGER.info("Updating registry for prefix: " + winePrefix.getPath());
LOGGER.info(registryPatch);
interactiveScriptSession.eval("include([\"Functions\", \"Engines\", \"Wine\"]);", ignored -> interactiveScriptSession.eval("new Wine()", output -> {
final ScriptObjectMirror wine = (ScriptObjectMirror) output;
wine.callMember("prefix", winePrefix.getName());
final ScriptObjectMirror regedit = (ScriptObjectMirror) wine.callMember("regedit");
regedit.callMember("patch", registryPatch);
wine.callMember("wait");
doneCallback.run();
}, errorCallback), errorCallback);
}
use of org.phoenicis.containers.wine.parameters.RegistryParameter in project POL-POM-5 by PhoenicisOrg.
the class WinePrefixContainerController method changeSetting.
public void changeSetting(WinePrefixContainerDTO winePrefix, RegistryParameter setting, Runnable doneCallback, Consumer<Exception> errorCallback) {
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
final String registryPatch = registryWriter.generateRegFileContent(setting.toRegistryPatch());
LOGGER.info("Updating registry for prefix: " + winePrefix.getPath());
LOGGER.info(registryPatch);
interactiveScriptSession.eval("include([\"Engines\", \"Wine\", \"Engine\", \"Object\"]);", ignored -> interactiveScriptSession.eval("new Wine()", output -> {
final ScriptObjectMirror wine = (ScriptObjectMirror) output;
wine.callMember("prefix", winePrefix.getName());
final ScriptObjectMirror regedit = (ScriptObjectMirror) wine.callMember("regedit");
regedit.callMember("patch", registryPatch);
wine.callMember("wait");
doneCallback.run();
}, errorCallback), errorCallback);
}
use of org.phoenicis.containers.wine.parameters.RegistryParameter in project phoenicis by PhoenicisOrg.
the class WinePrefixContainerController method changeSetting.
public void changeSetting(WinePrefixContainerDTO winePrefix, RegistryParameter setting, Runnable doneCallback, Consumer<Exception> errorCallback) {
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
final String registryPatch = registryWriter.generateRegFileContent(setting.toRegistryPatch());
LOGGER.info("Updating registry for prefix: " + winePrefix.getPath());
LOGGER.info(registryPatch);
interactiveScriptSession.eval("include([\"Engines\", \"Wine\", \"Engine\", \"Object\"]);", ignored -> interactiveScriptSession.eval("new Wine()", output -> {
final ScriptObjectMirror wine = (ScriptObjectMirror) output;
wine.callMember("prefix", winePrefix.getName());
final ScriptObjectMirror regedit = (ScriptObjectMirror) wine.callMember("regedit");
regedit.callMember("patch", registryPatch);
wine.callMember("wait");
doneCallback.run();
}, errorCallback), errorCallback);
}
Aggregations