-
-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an error message if android NDK is not installed #1344
Conversation
Does this actually lead to the message getting printed in your testing? In looking into this previously, this code:
... was preventing the See #791 |
Yeah, actually, if you look at the top of the |
Yes, the printing worked, tested on Windows:
whereas before I was just getting linker errors:
For me it was getting run. The problem is that it doesn't actually check if the files exist on disk, all it does is construct a path to the NDK. I could modify it to do the exists check in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, so this is handling the case where ANDROID_HOME
or ANDROID_NDK_ROOT
are set, but NDK can't actually be found at the specified location?
That makes sense! And it seems to be working in my testing :-)
tools/android.py
Outdated
@@ -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 + ".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("ERROR: Could not find NDK toolchain at " + toolchain + ".") | |
print("ERROR: Could not find NDK toolchain at " + toolchain + ".") |
Trailing whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Thanks! And congrats for your first merged Godot contribution 🎉 |
Cherry-picking to 4.2 in #1372 |
Cherry-picking to 4.1 in #1373 |
I had trouble figuring out why I couldn't compile for android and realized I didn't have the right NDK version installed. So I figured I would add an error message to make it more obvious.