diff --git a/.github/workflows/rodent-iv.yml b/.github/workflows/rodent-iv.yml
index 62d8b56..5086f2d 100644
--- a/.github/workflows/rodent-iv.yml
+++ b/.github/workflows/rodent-iv.yml
@@ -40,7 +40,8 @@ jobs:
- name: Sources at the pinned commit, with our two fixes
shell: bash
# packaging/rodent-iv/home-dir.patch: on Linux the engine now and then took a
- # wrong home folder and played without its personality and books.
+ # wrong home folder and played without its personality and books; on macOS it
+ # had none, found no personality and did not offer the Personality option.
# packaging/rodent-iv/think-thread.patch: the search thread read its parameter
# after it was gone; clang builds (macOS) searched garbage out of the book.
run: |
@@ -81,6 +82,14 @@ jobs:
echo "bestmove: $best"
legal=" a2a3 a2a4 b2b3 b2b4 c2c3 c2c4 d2d3 d2d4 e2e3 e2e4 f2f3 f2f4 g2g3 g2g4 h2h3 h2h4 b1a3 b1c3 g1f3 g1h3 "
[[ -n "$best" && "$legal" == *" $best "* ]]
+ - name: It offers its personalities (its own folder, a space in it; started elsewhere)
+ shell: bash
+ # As ChessPenguin runs it: on macOS from ~/Library/Application Support/….
+ run: |
+ home="$PWD/engine home"
+ mkdir -p "$home" && cp "./${{ matrix.name }}" "$home/" && cp -r src/personalities "$home/"
+ out=$(cd "$RUNNER_TEMP" && printf 'uci\nquit\n' | "$home/${{ matrix.name }}")
+ printf '%s\n' "$out" | grep '^option name Personality ' | grep -Eq ' var Tal( |$)'
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.name }}
@@ -102,7 +111,7 @@ jobs:
Rodent IV 0.33 by Paweł Koziol and Bernhard C. Maerz (GPL-3.0), built from the
authors' sources at https://github.com/nescitus/rodent-iv/tree/${COMMIT}
with two fixes (packaging/rodent-iv/home-dir.patch and think-thread.patch in
- ChessPenguin's repository: the engine's home folder on Linux; the search
+ ChessPenguin's repository: the engine's home folder on Linux and macOS; the search
thread's parameter, which clang builds read after it was gone) for
ChessPenguin, which downloads it on request. Not a ChessPenguin release.
EOF
diff --git a/docs/dev/tasks.md b/docs/dev/tasks.md
index e69695c..1e4543e 100644
--- a/docs/dev/tasks.md
+++ b/docs/dev/tasks.md
@@ -32,7 +32,7 @@
- ссылки с GitHub, AUR, Flathub (если будет), шахматных форумов.
### 3. Сайт: скриншоты Android, если сайт открыт с Android
-- **Статус:** новая.
+- **Статус:** сделано (2026-10-27): семь отдельных экранов телефона под «На телефоне» открывают галерею и просмотр, в шапке — четыре экрана рядом; остальным посетителям — как раньше.
- **Добавлено:** 2026-10-24.
- **Цель:** посетитель с телефона на Android видит в галерее и в шапке снимки мобильного приложения, а не десктопа; с компьютера — как сейчас.
- **С чего начать:**
@@ -91,7 +91,7 @@
- **Мысли:** поле комментария под нотацией или по двойному клику/клавише у хода; запись через `Game::annotate` (уже есть, с Undo); комментарии до хода и после; NAG-символы (!, ?, ±…) той же панелью; сохранение в свою базу — Ctrl+S (задача «свои базы»).
### 10. Две запущенные копии программы затирают полку друг друга
-- **Статус:** новая (баг, 2026-10-25).
+- **Статус:** отложено (2026-10-27): по словам владельца, случается только на тестовом компьютере, где одновременно стоят сборка и установленная версия; обычных пользователей не задевает.
- **Как нашли:** владелец создал базы «MyBase» и «mуBase2» в новой сборке, а в это время работала установленная 1.0.3. Файлы на месте (`~/Documents/ChessPenguin/`), но с полки пропали.
- **Причина:** `Settings::save` (`apps/desktop/src/settings.rs`) пишет файл настроек целиком из памяти своей копии. Копия, загруженная раньше, при сохранении (выбор базы, выход) возвращает старый список баз и всё остальное.
- **Варианты:** (а) одна копия программы: второй запуск поднимает окно первой (замок + сигнал; на трёх системах по-разному); (б) сохранять только изменённое: при записи перечитать файл и взять с диска поля, которые эта копия не меняла (трёхстороннее слияние по ключам JSON), а полку объединять; (в) обе копии следят за файлом и перечитывают его.
diff --git a/packaging/rodent-iv/home-dir.patch b/packaging/rodent-iv/home-dir.patch
index f85e614..33c028c 100644
--- a/packaging/rodent-iv/home-dir.patch
+++ b/packaging/rodent-iv/home-dir.patch
@@ -1,8 +1,47 @@
diff --git a/sources/src/rodenthome.cpp b/sources/src/rodenthome.cpp
-index 058cdaa..e8018b7 100755
+index 058cdaa..4bfcb2a 100755
--- a/sources/src/rodenthome.cpp
+++ b/sources/src/rodenthome.cpp
-@@ -199,7 +199,10 @@ void SetRodentHomeDir() {
+@@ -22,6 +22,11 @@ If not, see .
+ #include
+ #include
+ #endif
++#if defined (__APPLE__)
++ #include
++ #include
++ #include
++#endif
+
+ #include "rodent.h"
+
+@@ -174,9 +179,23 @@ void SetRodentHomeDir() {
+ }
+
+ #elif defined (__APPLE__)
+- // #error something should be done here, look for _NSGetExecutablePath(path, &size)
+- // RodentHomeDirWStr = ...
+-
++ // As on Linux: the home is the executable's folder (an empty home made every
++ // folder relative to the one the engine changed into last, so no personality was
++ // found and the Personality option was not offered).
++ RodentHomeDirWStr = Str2WStr(GetEnv("RODENT4HOME"));
++ if (RodentHomeDirWStr != L"") {
++ PathEndSlash(RodentHomeDirWStr);
++ printf_debug("override for home path: '%s'\n", WStr2Str(RodentHomeDirWStr).c_str());
++ } else {
++ char exe_path[PATH_MAX];
++ char real_path[PATH_MAX];
++ uint32_t size = sizeof(exe_path);
++ if (_NSGetExecutablePath(exe_path, &size) == 0 && realpath(exe_path, real_path) != NULL) {
++ *(strrchr(real_path, '/') + 1) = '\0';
++ RodentHomeDirWStr = CStr2WStr(real_path);
++ }
++ }
++
+ #elif defined (ANDROID)
+ RodentHomeDirWStr = L"";
+
+@@ -199,7 +218,10 @@ void SetRodentHomeDir() {
} else {
char exe_path[1024];
// getting the current executable location ...