Feat: incompatible process
This commit is contained in:
committed by
Laurent Clouet
parent
b295467ca7
commit
83cd92b903
@@ -66,6 +66,7 @@ public class SettingsLoader {
|
||||
THEME("theme"),
|
||||
LOG_DIR("log-dir"),
|
||||
DEBUG("debug"),
|
||||
INCOMPATIBLE_PROCESS("incompatible-process"),
|
||||
DISABLE_LARGE_DOWNLOADS("disable-large-downloads");
|
||||
|
||||
String propertyName;
|
||||
@@ -110,6 +111,7 @@ public class SettingsLoader {
|
||||
public static final String ARG_HOSTNAME = "-hostname";
|
||||
public static final String ARG_HEADLESS = "--headless";
|
||||
public static final String ARG_DISABLE_LARGE_DOWNLOADS = "--disable-large-downloads";
|
||||
public static final String ARG_INCOMPATIBLE_PROCESS = "-incompatible-process";
|
||||
|
||||
|
||||
private String path;
|
||||
@@ -135,6 +137,7 @@ public class SettingsLoader {
|
||||
private Option<String> theme;
|
||||
private Option<Integer> priority;
|
||||
private Option<String> disableLargeDownloads;
|
||||
private Option<String> incompatibleProcess;
|
||||
|
||||
public SettingsLoader(String path_) {
|
||||
if (path_ == null) {
|
||||
@@ -148,7 +151,7 @@ public class SettingsLoader {
|
||||
public void setSettings(String path_, String login_, String password_, String proxy_, String hostname_,
|
||||
ComputeType computeMethod_, GPUDevice gpu_, Integer cores_, Long maxRam_,
|
||||
Integer maxRenderTime_, String cacheDir_, String sharedZip_, Boolean autoSignIn_, Boolean useSysTray_,
|
||||
Boolean isHeadless, String ui_, String theme_, Integer priority_, Boolean disableLargeDownloads_, Boolean debug_) {
|
||||
Boolean isHeadless, String ui_, String theme_, Integer priority_, Boolean disableLargeDownloads_, Boolean debug_, String incompatibleProcess_) {
|
||||
if (path_ == null) {
|
||||
path = OS.getOS().getDefaultConfigFilePath();
|
||||
}
|
||||
@@ -169,6 +172,7 @@ public class SettingsLoader {
|
||||
theme = setValue(theme_, theme, ARG_THEME);
|
||||
disableLargeDownloads = setValue(disableLargeDownloads_.toString(), disableLargeDownloads, ARG_DISABLE_LARGE_DOWNLOADS);
|
||||
debug = setValue(debug_.toString(), debug, ARG_VERBOSE);
|
||||
incompatibleProcess = setValue(incompatibleProcess_, incompatibleProcess, ARG_INCOMPATIBLE_PROCESS);
|
||||
|
||||
if (cores_ > 0) {
|
||||
cores = setValue(cores_.toString(), cores, ARG_CORES);
|
||||
@@ -290,6 +294,7 @@ public class SettingsLoader {
|
||||
setProperty(prop, configFileProp, PropertyNames.DISABLE_LARGE_DOWNLOADS, disableLargeDownloads);
|
||||
setProperty(prop, configFileProp, PropertyNames.LOG_DIR, logDir);
|
||||
setProperty(prop, configFileProp, PropertyNames.DEBUG, debug);
|
||||
setProperty(prop, configFileProp, PropertyNames.INCOMPATIBLE_PROCESS, incompatibleProcess);
|
||||
prop.store(output, null);
|
||||
}
|
||||
catch (IOException io) {
|
||||
@@ -395,6 +400,8 @@ public class SettingsLoader {
|
||||
disableLargeDownloads = loadConfigOption(prop, PropertyNames.DISABLE_LARGE_DOWNLOADS, disableLargeDownloads, ARG_DISABLE_LARGE_DOWNLOADS);
|
||||
|
||||
logDir = loadConfigOption(prop, PropertyNames.LOG_DIR, logDir, ARG_LOG_DIRECTORY);
|
||||
|
||||
incompatibleProcess = loadConfigOption(prop, PropertyNames.INCOMPATIBLE_PROCESS, incompatibleProcess, "");
|
||||
|
||||
debug = loadConfigOption(prop, PropertyNames.DEBUG, debug, ARG_VERBOSE);
|
||||
|
||||
@@ -470,6 +477,11 @@ public class SettingsLoader {
|
||||
if (config.getPriority() == 19) { // 19 is default value
|
||||
config.setPriority(priority.getValue());
|
||||
}
|
||||
|
||||
if (incompatibleProcess != null) {
|
||||
config.setIncompatibleProcess(incompatibleProcess.getValue());
|
||||
}
|
||||
|
||||
try {
|
||||
if (config.getComputeMethod() == null && computeMethod == null) {
|
||||
config.setComputeMethod(ComputeType.CPU);
|
||||
@@ -574,6 +586,7 @@ public class SettingsLoader {
|
||||
this.disableLargeDownloads = new Option<>(String.valueOf(defaultConfigValues.isDisableLargeDownloads()), ARG_DISABLE_LARGE_DOWNLOADS);
|
||||
this.logDir = null;
|
||||
this.debug = null;
|
||||
this.incompatibleProcess = null;
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
|
||||
Reference in New Issue
Block a user