The play sheet chooses Maia or Rodent IV, and Rodent's character in a full-screen list (docs/design/android-rodent.md, docs/decisions.md «Rodent IV на телефоне»). The engine is built from its authors' sources by androidApp/scripts/rodent4.sh (patches: no wordexp.h on bionic; the search thread took its parameter by reference, which clang builds read after it was gone) and ships in both APKs; the opening books are one checked download. Rodent's tables, its book manifest and its opponent loop move from the desktop into crates/play, shared by both apps; uci's EngineConfig takes an environment (RODENT4HOME). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
Android (NDK, bionic): no wordexp.h. The authors' sources leave out the wordexp code only
|
|
when ANDROID is defined, which also selects their /sdcard/Rodent4 home folder; NDK clang
|
|
defines __ANDROID__, so leave it out for that too and keep the RODENT4HOME home folder.
|
|
Only the RODENT4BOOKS/RODENT4PERSONALITIES overrides go (ChDirEnv is false), as in the
|
|
authors' Android build.
|
|
|
|
diff --git a/sources/src/rodent.h b/sources/src/rodent.h
|
|
index 30ccf22..8580d86 100755
|
|
--- a/sources/src/rodent.h
|
|
+++ b/sources/src/rodent.h
|
|
@@ -1078,7 +1078,7 @@ extern const int ph_value[7];
|
|
#endif
|
|
void PrintOverrides();
|
|
// change dir and return true on success
|
|
- #ifndef ANDROID
|
|
+ #if !defined(ANDROID) && !defined(__ANDROID__)
|
|
bool ChDirEnv(const char *env_name);
|
|
#else
|
|
#define ChDirEnv(dummy) false
|
|
diff --git a/sources/src/util.cpp b/sources/src/util.cpp
|
|
index b0a028b..e32be00 100644
|
|
--- a/sources/src/util.cpp
|
|
+++ b/sources/src/util.cpp
|
|
@@ -28,7 +28,7 @@ If not, see <http://www.gnu.org/licenses/>.
|
|
#else
|
|
#include <unistd.h>
|
|
#include <sys/time.h>
|
|
- #ifndef ANDROID
|
|
+ #if !defined(ANDROID) && !defined(__ANDROID__) // bionic has no wordexp
|
|
#include <wordexp.h>
|
|
#endif
|
|
#endif
|
|
@@ -330,7 +330,7 @@ void PrintOverrides() {
|
|
if (char *ptr = getenv("RODENT4PERSONALITIES"))
|
|
printfUciOut("info string override for personalities path: '%s'\n", ptr);
|
|
}
|
|
-#ifndef ANDROID
|
|
+#if !defined(ANDROID) && !defined(__ANDROID__)
|
|
bool ChDirEnv(const char *env_name) {
|
|
char *env_path;
|
|
env_path = getenv(env_name);
|