mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 14:15:16 +01:00
DroidFish: Use different GTB path for network engines and local engines.
This commit is contained in:
parent
4fbb4b721c
commit
0f9f9f6e01
|
@ -405,6 +405,8 @@ you are not actively using the program.\
|
||||||
<string name="prefs_tbEngineProbe_summary">Enable tablebase probing in engine, when supported. Takes effect next time engine is started</string>
|
<string name="prefs_tbEngineProbe_summary">Enable tablebase probing in engine, when supported. Takes effect next time engine is started</string>
|
||||||
<string name="prefs_gtbPath_title">GTB Directory</string>
|
<string name="prefs_gtbPath_title">GTB Directory</string>
|
||||||
<string name="prefs_gtbPath_summary">Directory where Gaviota tablebases are installed. Leave blank to use default directory</string>
|
<string name="prefs_gtbPath_summary">Directory where Gaviota tablebases are installed. Leave blank to use default directory</string>
|
||||||
|
<string name="prefs_gtbPathNet_title">GTB Network Directory</string>
|
||||||
|
<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_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_rtbPath_summary">Directory where Syzygy tablebases are installed. Leave blank to use default directory</string>
|
||||||
<string name="buttonDesc_custom1">@string/prefs_custom_button_1</string>
|
<string name="buttonDesc_custom1">@string/prefs_custom_button_1</string>
|
||||||
|
|
|
@ -687,6 +687,12 @@
|
||||||
android:summary="@string/prefs_gtbPath_summary"
|
android:summary="@string/prefs_gtbPath_summary"
|
||||||
android:defaultValue="">
|
android:defaultValue="">
|
||||||
</EditTextPreference>
|
</EditTextPreference>
|
||||||
|
<EditTextPreference
|
||||||
|
android:key="gtbPathNet"
|
||||||
|
android:title="@string/prefs_gtbPathNet_title"
|
||||||
|
android:summary="@string/prefs_gtbPathNet_summary"
|
||||||
|
android:defaultValue="">
|
||||||
|
</EditTextPreference>
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:key="rtbPath"
|
android:key="rtbPath"
|
||||||
android:title="@string/prefs_rtbPath_title"
|
android:title="@string/prefs_rtbPath_title"
|
||||||
|
|
|
@ -970,6 +970,8 @@ public class DroidFish extends Activity implements GUIInterface {
|
||||||
gtbPath = extDir.getAbsolutePath() + sep + gtbDefaultDir;
|
gtbPath = extDir.getAbsolutePath() + sep + gtbDefaultDir;
|
||||||
}
|
}
|
||||||
engineOptions.gtbPath = gtbPath;
|
engineOptions.gtbPath = gtbPath;
|
||||||
|
String gtbPathNet = settings.getString("gtbPathNet", "").trim();
|
||||||
|
engineOptions.gtbPathNet = gtbPathNet;
|
||||||
String rtbPath = settings.getString("rtbPath", "").trim();
|
String rtbPath = settings.getString("rtbPath", "").trim();
|
||||||
if (rtbPath.length() == 0) {
|
if (rtbPath.length() == 0) {
|
||||||
File extDir = Environment.getExternalStorageDirectory();
|
File extDir = Environment.getExternalStorageDirectory();
|
||||||
|
|
|
@ -26,6 +26,7 @@ public final class EngineOptions {
|
||||||
public boolean rootProbe; // Only search optimal moves at root
|
public boolean rootProbe; // Only search optimal moves at root
|
||||||
public boolean engineProbe; // Let engine use EGTB
|
public boolean engineProbe; // Let engine use EGTB
|
||||||
public String gtbPath; // GTB directory path
|
public String gtbPath; // GTB directory path
|
||||||
|
public String gtbPathNet; // GTB directory path for network engines
|
||||||
public String rtbPath; // Syzygy directory path
|
public String rtbPath; // Syzygy directory path
|
||||||
public String networkID; // host+port network settings
|
public String networkID; // host+port network settings
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ public final class EngineOptions {
|
||||||
rootProbe = false;
|
rootProbe = false;
|
||||||
engineProbe = false;
|
engineProbe = false;
|
||||||
gtbPath = "";
|
gtbPath = "";
|
||||||
|
gtbPathNet = "";
|
||||||
rtbPath = "";
|
rtbPath = "";
|
||||||
networkID = "";
|
networkID = "";
|
||||||
}
|
}
|
||||||
|
@ -47,6 +49,7 @@ public final class EngineOptions {
|
||||||
rootProbe = other.rootProbe;
|
rootProbe = other.rootProbe;
|
||||||
engineProbe = other.engineProbe;
|
engineProbe = other.engineProbe;
|
||||||
gtbPath = other.gtbPath;
|
gtbPath = other.gtbPath;
|
||||||
|
gtbPathNet = other.gtbPathNet;
|
||||||
rtbPath = other.rtbPath;
|
rtbPath = other.rtbPath;
|
||||||
networkID = other.networkID;
|
networkID = other.networkID;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +66,7 @@ public final class EngineOptions {
|
||||||
(rootProbe == other.rootProbe) &&
|
(rootProbe == other.rootProbe) &&
|
||||||
(engineProbe == other.engineProbe) &&
|
(engineProbe == other.engineProbe) &&
|
||||||
gtbPath.equals(other.gtbPath) &&
|
gtbPath.equals(other.gtbPath) &&
|
||||||
|
gtbPathNet.equals(other.gtbPathNet) &&
|
||||||
rtbPath.equals(other.rtbPath) &&
|
rtbPath.equals(other.rtbPath) &&
|
||||||
networkID.equals(other.networkID));
|
networkID.equals(other.networkID));
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,8 +206,8 @@ public class NetworkEngine extends UCIEngineBase {
|
||||||
hashMB = engineOptions.hashMB;
|
hashMB = engineOptions.hashMB;
|
||||||
setOption("Hash", engineOptions.hashMB);
|
setOption("Hash", engineOptions.hashMB);
|
||||||
if (engineOptions.engineProbe) {
|
if (engineOptions.engineProbe) {
|
||||||
gaviotaTbPath = engineOptions.gtbPath;
|
gaviotaTbPath = engineOptions.gtbPathNet;
|
||||||
setOption("GaviotaTbPath", engineOptions.gtbPath);
|
setOption("GaviotaTbPath", engineOptions.gtbPathNet);
|
||||||
setOption("GaviotaTbCache", 8);
|
setOption("GaviotaTbCache", 8);
|
||||||
syzygyPath = engineOptions.rtbPath;
|
syzygyPath = engineOptions.rtbPath;
|
||||||
setOption("SyzygyPath", engineOptions.rtbPath);
|
setOption("SyzygyPath", engineOptions.rtbPath);
|
||||||
|
@ -226,7 +226,7 @@ public class NetworkEngine extends UCIEngineBase {
|
||||||
return false;
|
return false;
|
||||||
if (hashMB != engineOptions.hashMB)
|
if (hashMB != engineOptions.hashMB)
|
||||||
return false;
|
return false;
|
||||||
if (hasOption("gaviotatbpath") && !gaviotaTbPath.equals(engineOptions.gtbPath))
|
if (hasOption("gaviotatbpath") && !gaviotaTbPath.equals(engineOptions.gtbPathNet))
|
||||||
return false;
|
return false;
|
||||||
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPath))
|
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPath))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user