Merge pull request #91339 from TCROC/windows-apk-build-fix
Fix for Android build on Windows
This commit is contained in:
commit
9824a9003f
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
from methods import print_warning
|
||||
|
||||
|
@ -82,10 +83,21 @@ if lib_arch_dir != "":
|
|||
env_android.Command(out_dir + "/libc++_shared.so", stl_lib_path, Copy("$TARGET", "$SOURCE"))
|
||||
|
||||
def generate_apk(target, source, env):
|
||||
gradle_process = []
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
gradle_process = [
|
||||
"cmd",
|
||||
"/c",
|
||||
"gradlew.bat",
|
||||
]
|
||||
else:
|
||||
gradle_process = ["./gradlew"]
|
||||
|
||||
if env["target"] != "editor" and env["dev_build"]:
|
||||
subprocess.run(
|
||||
[
|
||||
"./gradlew",
|
||||
gradle_process
|
||||
+ [
|
||||
"generateDevTemplate",
|
||||
"--quiet",
|
||||
],
|
||||
|
@ -94,8 +106,8 @@ if lib_arch_dir != "":
|
|||
else:
|
||||
# Android editor with `dev_build=yes` is handled by the `generateGodotEditor` task.
|
||||
subprocess.run(
|
||||
[
|
||||
"./gradlew",
|
||||
gradle_process
|
||||
+ [
|
||||
"generateGodotEditor" if env["target"] == "editor" else "generateGodotTemplates",
|
||||
"--quiet",
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue