mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@7a0ab9d561
This commit is contained in:
26
methods.py
26
methods.py
@@ -621,17 +621,41 @@ def Run(env, function):
|
||||
return Action(function, "$GENCOMSTR")
|
||||
|
||||
|
||||
def detect_darwin_toolchain_path(env):
|
||||
var_name = "APPLE_TOOLCHAIN_PATH"
|
||||
if not env[var_name]:
|
||||
try:
|
||||
xcode_path = subprocess.check_output(["xcode-select", "-p"]).strip().decode("utf-8")
|
||||
if xcode_path:
|
||||
env[var_name] = xcode_path + "/Toolchains/XcodeDefault.xctoolchain"
|
||||
except (subprocess.CalledProcessError, OSError):
|
||||
print_error("Failed to find SDK path while running 'xcode-select -p'.")
|
||||
raise
|
||||
|
||||
|
||||
def detect_darwin_sdk_path(platform, env):
|
||||
sdk_name = ""
|
||||
|
||||
if platform == "macos":
|
||||
sdk_name = "macosx"
|
||||
var_name = "MACOS_SDK_PATH"
|
||||
|
||||
elif platform == "ios":
|
||||
sdk_name = "iphoneos"
|
||||
var_name = "IOS_SDK_PATH"
|
||||
|
||||
elif platform == "iossimulator":
|
||||
sdk_name = "iphonesimulator"
|
||||
var_name = "IOS_SDK_PATH"
|
||||
|
||||
elif platform == "visionos":
|
||||
sdk_name = "xros"
|
||||
var_name = "VISIONOS_SDK_PATH"
|
||||
|
||||
elif platform == "visionossimulator":
|
||||
sdk_name = "xrsimulator"
|
||||
var_name = "VISIONOS_SDK_PATH"
|
||||
|
||||
else:
|
||||
raise Exception("Invalid platform argument passed to detect_darwin_sdk_path")
|
||||
|
||||
@@ -641,7 +665,7 @@ def detect_darwin_sdk_path(platform, env):
|
||||
if sdk_path:
|
||||
env[var_name] = sdk_path
|
||||
except (subprocess.CalledProcessError, OSError):
|
||||
print_error("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name))
|
||||
print_error("Failed to find SDK path while running 'xcrun --sdk {} --show-sdk-path'.".format(sdk_name))
|
||||
raise
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user