mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-01-30 17:13:50 +01:00
DroidFish: Use different RTB path for network engines and local engines.
This commit is contained in:
parent
c3acf44ac8
commit
2b7011acfe
|
@ -409,6 +409,8 @@ you are not actively using the program.\
|
|||
<string name="prefs_gtbPathNet_summary">Directory for network engines where Gaviota tablebases are installed.</string>
|
||||
<string name="prefs_rtbPath_title">Syzygy Directory</string>
|
||||
<string name="prefs_rtbPath_summary">Directory where Syzygy tablebases are installed. Leave blank to use default directory</string>
|
||||
<string name="prefs_rtbPathNet_title">Syzygy Network Directory</string>
|
||||
<string name="prefs_rtbPathNet_summary">Directory for network engines where Syzygy tablebases are installed.</string>
|
||||
<string name="buttonDesc_custom1">@string/prefs_custom_button_1</string>
|
||||
<string name="buttonDesc_custom2">@string/prefs_custom_button_2</string>
|
||||
<string name="buttonDesc_custom3">@string/prefs_custom_button_3</string>
|
||||
|
|
|
@ -699,6 +699,12 @@
|
|||
android:summary="@string/prefs_rtbPath_summary"
|
||||
android:defaultValue="">
|
||||
</EditTextPreference>
|
||||
<EditTextPreference
|
||||
android:key="rtbPathNet"
|
||||
android:title="@string/prefs_rtbPathNet_title"
|
||||
android:summary="@string/prefs_rtbPathNet_summary"
|
||||
android:defaultValue="">
|
||||
</EditTextPreference>
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
|
|
@ -979,6 +979,8 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||
rtbPath = extDir.getAbsolutePath() + sep + rtbDefaultDir;
|
||||
}
|
||||
engineOptions.rtbPath = rtbPath;
|
||||
String rtbPathNet = settings.getString("rtbPathNet", "").trim();
|
||||
engineOptions.rtbPathNet = rtbPathNet;
|
||||
|
||||
setEngineOptions(false);
|
||||
setEgtbHints(cb.getSelectedSquare());
|
||||
|
|
|
@ -28,6 +28,7 @@ public final class EngineOptions {
|
|||
public String gtbPath; // GTB directory path
|
||||
public String gtbPathNet; // GTB directory path for network engines
|
||||
public String rtbPath; // Syzygy directory path
|
||||
public String rtbPathNet; // Syzygy directory path for network engines
|
||||
public String networkID; // host+port network settings
|
||||
|
||||
public EngineOptions() {
|
||||
|
@ -39,6 +40,7 @@ public final class EngineOptions {
|
|||
gtbPath = "";
|
||||
gtbPathNet = "";
|
||||
rtbPath = "";
|
||||
rtbPathNet = "";
|
||||
networkID = "";
|
||||
}
|
||||
|
||||
|
@ -51,6 +53,7 @@ public final class EngineOptions {
|
|||
gtbPath = other.gtbPath;
|
||||
gtbPathNet = other.gtbPathNet;
|
||||
rtbPath = other.rtbPath;
|
||||
rtbPathNet = other.rtbPathNet;
|
||||
networkID = other.networkID;
|
||||
}
|
||||
|
||||
|
@ -68,6 +71,7 @@ public final class EngineOptions {
|
|||
gtbPath.equals(other.gtbPath) &&
|
||||
gtbPathNet.equals(other.gtbPathNet) &&
|
||||
rtbPath.equals(other.rtbPath) &&
|
||||
rtbPathNet.equals(other.rtbPathNet) &&
|
||||
networkID.equals(other.networkID));
|
||||
}
|
||||
|
||||
|
|
|
@ -209,8 +209,8 @@ public class NetworkEngine extends UCIEngineBase {
|
|||
gaviotaTbPath = engineOptions.gtbPathNet;
|
||||
setOption("GaviotaTbPath", engineOptions.gtbPathNet);
|
||||
setOption("GaviotaTbCache", 8);
|
||||
syzygyPath = engineOptions.rtbPath;
|
||||
setOption("SyzygyPath", engineOptions.rtbPath);
|
||||
syzygyPath = engineOptions.rtbPathNet;
|
||||
setOption("SyzygyPath", engineOptions.rtbPathNet);
|
||||
}
|
||||
optionsInitialized = true;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ public class NetworkEngine extends UCIEngineBase {
|
|||
return false;
|
||||
if (hasOption("gaviotatbpath") && !gaviotaTbPath.equals(engineOptions.gtbPathNet))
|
||||
return false;
|
||||
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPath))
|
||||
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPathNet))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user