diff --git a/katrain/gui/popups.py b/katrain/gui/popups.py index 96b6aa6..44c72d8 100644 --- a/katrain/gui/popups.py +++ b/katrain/gui/popups.py @@ -292,6 +292,10 @@ class AIPopup(QuickConfigGui): class ConfigPopup(QuickConfigGui): + def __init__(self, katrain): + super().__init__(katrain) + self.configfile.text = i18n._("config file path").format(file=katrain.config_file) + def update_config(self, save_to_file=True): updated = super().update_config(save_to_file=save_to_file) self.katrain.debug_level = self.katrain.config("general/debug_level", OUTPUT_INFO) diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo index 77ce309..753fb90 100644 Binary files a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po index 3fb4f80..501f7e9 100644 --- a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po @@ -353,6 +353,9 @@ msgstr "General Settings" msgid "engine settings" msgstr "KataGo Engine Settings" +msgid "config file path" +msgstr "All options are saved in {file}" + msgid "engine:katago" msgstr "Path to KataGo executable" diff --git a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo index 14f7c7a..a162eb5 100644 Binary files a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po index 9c461a6..e32ba57 100644 --- a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po @@ -558,3 +558,7 @@ msgstr "" "Picks moves biased below the `threshold` line and plays the best " "one.Increase `line_weight` to penalize moves near the center more. Stops " "strategy after the 'endgame' fraction of the board is filled." + +#. TODO +msgid "config file path" +msgstr "All options are saved in {file}" diff --git a/katrain/i18n/locales/haha/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/haha/LC_MESSAGES/katrain.mo index a6d4aa1..0ebc284 100644 Binary files a/katrain/i18n/locales/haha/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/haha/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/haha/LC_MESSAGES/katrain.po b/katrain/i18n/locales/haha/LC_MESSAGES/katrain.po index 5fdbfc5..13f6244 100644 --- a/katrain/i18n/locales/haha/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/haha/LC_MESSAGES/katrain.po @@ -518,3 +518,6 @@ msgid "engine:wide_root_noise:hint" msgstr "" "ㅋㅋUse 0.02-0.1 to show\n" "more possible moves" + +msgid "config file path" +msgstr "ㅋㅋAll options are saved in {file}" diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo index d3519ba..3fb2963 100644 Binary files a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po index 4e545be..98c28a3 100644 --- a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po @@ -528,3 +528,7 @@ msgid "aihelp:p:territory" msgstr "" "`threshold`선 밑의 수를 더 많이 뽑은 후 그 중 최선의 수를 둡니다. `line_weight`을 증가시키면 바둑판 중앙에 있는" " 수를 더욱 꺼리게 됩니다. 판이 `endgame` 비율만큼 차면 평범하게 둡니다." + +#. TODO +msgid "config file path" +msgstr "All options are saved in {file}" diff --git a/katrain/popups.kv b/katrain/popups.kv index d80aae2..496ad03 100644 --- a/katrain/popups.kv +++ b/katrain/popups.kv @@ -75,6 +75,7 @@ font_size: DESC_FONT_SIZE * 0.66 : + configfile: configfile BoxLayout: size_hint: 1,9 orientation: 'horizontal' @@ -84,7 +85,7 @@ spacing: CP_SPACING Label: DescriptionLabel: - text: i18n._('General Settings') + text: i18n._('general settings') font_size: DESC_FONT_SIZE * 1.5 DescriptionLabel: text: i18n._("general:sgf_load") @@ -113,7 +114,8 @@ Label: Label: Label: - Label: + SmallDescriptionLabel: + id: configfile Label: BackgroundMixin: background_color: LIGHTGREY @@ -126,7 +128,7 @@ Label: DescriptionLabel: font_size: DESC_FONT_SIZE * 1.5 - text: i18n._('Engine Settings') + text: i18n._('engine settings') DescriptionLabel: text: i18n._("engine:katago") AnchorLayout: diff --git a/spec/KaTrain.spec b/spec/KaTrain.spec index 08f137f..7ea8808 100644 --- a/spec/KaTrain.spec +++ b/spec/KaTrain.spec @@ -3,7 +3,6 @@ from kivy_deps import sdl2, glew from kivymd import hooks_path as kivymd_hooks_path block_cipher = None -console = False # pyinstaller spec/katrain.spec --noconfirm # --upx-dir my @@ -43,60 +42,50 @@ a.datas = [ print("DATA FILTERED", len(a.datas)) -pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) -exe = EXE( - pyz, - a.scripts, - [], - exclude_binaries=True, - name="KaTrain", - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - console=console, - icon="C:\\icon.ico", -) +console_names = {True:"KaTrain",False:"KaTrainNC"} -coll = COLLECT( - exe, - a.binaries, - a.zipfiles, - a.datas, - *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], - strip=False, - upx=True, - upx_exclude=[], - name="KaTrain", -) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], - debug=False, - strip=False, - upx=True, - name="KaTrain", - console=False, - icon="C:\\icon.ico", -) +for console, name in console_names.items(): -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], - debug=False, - strip=False, - upx=True, - name="KaTrainConsole", - console=True, - icon="C:\\icon.ico", -) + pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name=name, + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=console, + icon="C:\\icon.ico", + ) + + coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], + strip=False, + upx=True, + upx_exclude=[], + name=name, + ) + + exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], + debug=False, + strip=False, + upx=True, + name=name, + console=False, + icon="C:\\icon.ico", + ) +