option for command override

This commit is contained in:
Sander Land committed 2020-08-18 18:54:14 +02:00
1 parent fa7c5dac5f
commit 22ad5c34d3
19 files changed
+91 -8

No files matched your search

+1 -1
View File
@@ -332,7 +332,7 @@ class KaTrainGui(Screen, KaTrainBase):
self.controls.timer.paused = True
if not self.config_popup:
self.config_popup = I18NPopup(
title_key="general settings title", size=[dp(1200), dp(800)], content=ConfigPopup(self)
title_key="general settings title", size=[dp(1200), dp(850)], content=ConfigPopup(self)
).__self__
self.config_popup.content.popup = self.config_popup
self.config_popup.open()
+3 -5
View File
@@ -30,7 +30,7 @@ class KataGoEngine:
def get_rules(node):
return KataGoEngine.RULESETS.get(str(node.ruleset).lower(), "japanese")
def __init__(self, katrain, config, override_command=None):
def __init__(self, katrain, config):
self.katrain = katrain
self.queries = {} # outstanding query id -> start time and callback
self.config = config
@@ -43,10 +43,8 @@ class KataGoEngine:
self.stderr_thread = None
exe = config.get("katago", "").strip()
if override_command:
self.command = override_command
elif exe.startswith('"') and exe.endswith('"'):
self.command = exe.strip('"')
if config.get("altcommand",""):
self.command = config["altcommand"]
else:
if not exe:
if platform == "win":
Binary file not shown.
@@ -607,3 +607,13 @@ msgstr "Default Theme"
#. TODO - theme label
msgid "theme"
msgstr "Colour Theme"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
Binary file not shown.
@@ -651,3 +651,13 @@ msgstr "Default Theme"
#. TODO - theme label
msgid "theme"
msgstr "Colour Theme"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
Binary file not shown.
@@ -411,6 +411,14 @@ msgstr "Path to KataGo model file"
msgid "engine:config"
msgstr "Path to KataGo config file"
msgid "engine:altcommand"
msgstr "Override Engine Command"
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
msgid "engine:max_visits"
msgstr "Maximum number of visits in analysis"
Binary file not shown.
@@ -647,3 +647,13 @@ msgstr "Default Theme"
#. TODO - theme label
msgid "theme"
msgstr "Colour Theme"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
Binary file not shown.
@@ -688,3 +688,13 @@ msgstr "Default Theme"
#. TODO - theme label
msgid "theme"
msgstr "Colour Theme"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
Binary file not shown.
@@ -634,3 +634,13 @@ msgstr "デフォルト"
#. TODO - theme label
msgid "theme"
msgstr "カラーテーマ"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
Binary file not shown.
@@ -623,3 +623,13 @@ msgstr "Default Theme"
#. TODO - theme label
msgid "theme"
msgstr "Colour Theme"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
Binary file not shown.
@@ -648,3 +648,13 @@ msgstr "Default Theme"
#. TODO - theme label
msgid "theme"
msgstr "Colour Theme"
#. TODO
msgid "engine:altcommand:hint"
msgstr ""
"Full command used to start the engine, for e.g. using plink to connect to a "
"remote engine. All other model options will be ignored."
#. TODO
msgid "engine:altcommand"
msgstr "Override Engine Command"
+9 -2
View File
@@ -87,8 +87,8 @@
font_size: DESC_FONT_SIZE * 1.5
GridLayout:
cols: 2
rows: 4
size_hint: 1,4
rows: 5
size_hint: 1,5
spacing: CP_SPACING
DescriptionLabel:
text: i18n._("engine:katago")
@@ -126,6 +126,13 @@
sync_height_frac: 1.0
-font_size: self.height * 0.5
-background_color: [*[c*255/88 for c in BOX_BACKGROUND_COLOR[:3]], 1] # compensate for texture
DescriptionLabel:
text: i18n._("engine:altcommand")
size_hint: 0.33, 1
AnchorLayout:
LabelledPathInput:
input_property: "engine/altcommand"
hint_text: i18n._("engine:altcommand:hint")
BoxLayout:
size_hint: 1,1
orientation: 'horizontal'