mirror of
https://github.com/topjohnwu/Magisk
synced 2025-08-31 12:15:15 +00:00
Add support to build with NDK r10e
This commit is contained in:
8
build.py
8
build.py
@@ -87,9 +87,13 @@ def build_binary(args):
|
||||
os.utime(os.path.join('jni', 'Android.mk'))
|
||||
|
||||
debug_flag = '' if args.release else '-DMAGISK_DEBUG'
|
||||
cflag = 'APP_CFLAGS=\"-DMAGISK_VERSION=\\\"{}\\\" -DMAGISK_VER_CODE={} {}\"'.format(args.versionString, args.versionCode, debug_flag)
|
||||
cflag = 'MAGISK_FLAGS=\"-DMAGISK_VERSION=\\\"{}\\\" -DMAGISK_VER_CODE={} {}\"'.format(args.versionString, args.versionCode, debug_flag)
|
||||
|
||||
if 'ANDROID_NDK' in os.environ:
|
||||
ndk_build = os.path.join(os.environ['ANDROID_NDK'], 'ndk-build')
|
||||
else:
|
||||
ndk_build = os.path.join(os.environ['ANDROID_HOME'], 'ndk-bundle', 'ndk-build')
|
||||
|
||||
ndk_build = os.path.join(os.environ['ANDROID_HOME'], 'ndk-bundle', 'ndk-build')
|
||||
# Prebuild
|
||||
proc = subprocess.run('{} PRECOMPILE=true {} -j{}'.format(ndk_build, cflag, multiprocessing.cpu_count()), shell=True)
|
||||
if proc.returncode != 0:
|
||||
|
Reference in New Issue
Block a user