Skip to content

Commit cc0d5a4

Browse files
committed
added fix for android build on windows
1 parent 4728ff3 commit cc0d5a4

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

platform/android/SCsub

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22

3+
import sys
34
import subprocess
45

56
Import("env")
@@ -81,10 +82,21 @@ if lib_arch_dir != "":
8182
env_android.Command(out_dir + "/libc++_shared.so", stl_lib_path, Copy("$TARGET", "$SOURCE"))
8283

8384
def generate_apk(target, source, env):
85+
gradle_process = []
86+
87+
if sys.platform.startswith("win"):
88+
gradle_process = [
89+
"cmd",
90+
"/c",
91+
"gradlew.bat",
92+
]
93+
else:
94+
gradle_process = ["./gradlew"]
95+
8496
if env["target"] != "editor" and env["dev_build"]:
8597
subprocess.run(
86-
[
87-
"./gradlew",
98+
gradle_process
99+
+ [
88100
"generateDevTemplate",
89101
"--quiet",
90102
],
@@ -93,8 +105,8 @@ if lib_arch_dir != "":
93105
else:
94106
# Android editor with `dev_build=yes` is handled by the `generateGodotEditor` task.
95107
subprocess.run(
96-
[
97-
"./gradlew",
108+
gradle_process
109+
+ [
98110
"generateGodotEditor" if env["target"] == "editor" else "generateGodotTemplates",
99111
"--quiet",
100112
],

0 commit comments

Comments
 (0)