mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-25 02:55:33 +00:00
Proper Windows support
This commit is contained in:
parent
305e8b3d14
commit
f8c38eab74
7
build.py
7
build.py
@ -432,15 +432,16 @@ def find_jdk():
|
|||||||
if not op.exists(jbr):
|
if not op.exists(jbr):
|
||||||
jbr = op.join(studio, "Contents", "jbr", "Contents", "Home", "bin")
|
jbr = op.join(studio, "Contents", "jbr", "Contents", "Home", "bin")
|
||||||
if op.exists(jbr):
|
if op.exists(jbr):
|
||||||
env["PATH"] = f'{jbr}:{env["PATH"]}'
|
env["PATH"] = f'{jbr}{os.pathsep}{env["PATH"]}'
|
||||||
|
|
||||||
no_jdk = False
|
no_jdk = False
|
||||||
try:
|
try:
|
||||||
proc = subprocess.run(
|
proc = subprocess.run(
|
||||||
["javac", "-version"],
|
"javac -version",
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
env=env,
|
env=env,
|
||||||
|
shell=True
|
||||||
)
|
)
|
||||||
no_jdk = proc.returncode != 0
|
no_jdk = proc.returncode != 0
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
@ -516,7 +517,7 @@ def cleanup(args):
|
|||||||
|
|
||||||
if "java" in args.target:
|
if "java" in args.target:
|
||||||
header("* Cleaning java")
|
header("* Cleaning java")
|
||||||
execv([gradlew, "app:clean", "app:shared:clean", "stub:clean"])
|
execv([gradlew, "app:clean", "app:shared:clean", "stub:clean"], env=find_jdk())
|
||||||
rm_rf(op.join("app", "src", "debug"))
|
rm_rf(op.join("app", "src", "debug"))
|
||||||
rm_rf(op.join("app", "src", "release"))
|
rm_rf(op.join("app", "src", "release"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user