From f9b66e3c722c44861c32f7aa8c982a0254f1e1cb Mon Sep 17 00:00:00 2001 From: ArchLinus Date: Fri, 29 Dec 2023 09:32:14 -0500 Subject: [PATCH] Add an error message if android NDK is not installed (cherry picked from commit 718d0baea3e310391c6feb5b61b8e2dda6a08533) --- tools/android.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/android.py b/tools/android.py index bee58c4e..0c253541 100644 --- a/tools/android.py +++ b/tools/android.py @@ -64,6 +64,12 @@ def generate(env): elif sys.platform == "darwin": toolchain += "darwin-x86_64" env.Append(LINKFLAGS=["-shared"]) + + if not os.path.exists(toolchain): + print("ERROR: Could not find NDK toolchain at " + toolchain + ".") + print("Make sure NDK version " + get_ndk_version() + " is installed.") + env.Exit(1) + env.PrependENVPath("PATH", toolchain + "/bin") # This does nothing half of the time, but we'll put it here anyways # Get architecture info