SCons: "Environment" to "SConsEnvironment"
This commit is contained in:
parent
907db8eebc
commit
633dcf6dfd
6 changed files with 24 additions and 24 deletions
|
|
@ -6,7 +6,7 @@ import subprocess
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from SCons import Environment
|
||||
from SCons.Script.SConscript import SConsEnvironment
|
||||
|
||||
|
||||
def get_name():
|
||||
|
|
@ -51,7 +51,7 @@ def get_min_sdk_version(platform):
|
|||
return int(platform.split("-")[1])
|
||||
|
||||
|
||||
def get_android_ndk_root(env):
|
||||
def get_android_ndk_root(env: "SConsEnvironment"):
|
||||
return env["ANDROID_HOME"] + "/ndk/" + get_ndk_version()
|
||||
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ def get_flags():
|
|||
|
||||
# Check if Android NDK version is installed
|
||||
# If not, install it.
|
||||
def install_ndk_if_needed(env):
|
||||
def install_ndk_if_needed(env: "SConsEnvironment"):
|
||||
print("Checking for Android NDK...")
|
||||
sdk_root = env["ANDROID_HOME"]
|
||||
if not os.path.exists(get_android_ndk_root(env)):
|
||||
|
|
@ -96,7 +96,7 @@ def install_ndk_if_needed(env):
|
|||
env["ANDROID_NDK_ROOT"] = get_android_ndk_root(env)
|
||||
|
||||
|
||||
def configure(env: "Environment"):
|
||||
def configure(env: "SConsEnvironment"):
|
||||
# Validate arch.
|
||||
supported_arches = ["x86_32", "x86_64", "arm32", "arm64"]
|
||||
if env["arch"] not in supported_arches:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue