mirror of
https://github.com/topjohnwu/Magisk
synced 2025-09-05 04:25:10 +00:00
Proper Windows building support
This commit is contained in:
6
build.py
6
build.py
@@ -3,6 +3,10 @@ import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
if os.name == 'nt':
|
||||
from colorama import init
|
||||
init()
|
||||
|
||||
def error(str):
|
||||
print('\n' + '\033[41m' + str + '\033[0m' + '\n')
|
||||
sys.exit(1)
|
||||
@@ -85,7 +89,7 @@ def build_binary(args):
|
||||
|
||||
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)
|
||||
proc = subprocess.run('{} PRECOMPILE=true {} -j{}'.format(ndk_build, cflag, multiprocessing.cpu_count()), shell=True)
|
||||
if proc.returncode != 0:
|
||||
error('Build Magisk binary failed!')
|
||||
|
||||
|
Reference in New Issue
Block a user