Skip to content

Commit

Permalink
added fix for android build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
TCROC authored and huwpascoe committed May 10, 2024
1 parent 6cd3641 commit 859e85d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions platform/android/SCsub
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python

import sys
import subprocess
from methods import print_warning

Expand Down Expand Up @@ -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",
],
Expand All @@ -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",
],
Expand Down

0 comments on commit 859e85d

Please sign in to comment.