Fix erroneous macOS build bundle generation

(cherry picked from commit 3fa1a3e0f8)
This commit is contained in:
Spartan322
2025-08-13 22:41:07 -04:00
parent 700d0443e5
commit f6ceeba78b

View File

@@ -16,7 +16,7 @@ def generate_bundle(target, source, env):
if env.editor_build:
# Editor bundle.
prefix = "godot." + env["platform"] + "." + env["target"]
prefix = "redot." + env["platform"] + "." + env["target"]
if env.dev_build:
prefix += ".dev"
if env["precision"] == "double":
@@ -34,9 +34,9 @@ def generate_bundle(target, source, env):
if not os.path.isdir(app_dir + "/Contents/MacOS"):
os.mkdir(app_dir + "/Contents/MacOS")
if target_bin != "":
shutil.copy(target_bin, app_dir + "/Contents/MacOS/Godot")
shutil.copy(target_bin, app_dir + "/Contents/MacOS/Redot")
if "mono" in env.module_version_string:
shutil.copytree(Dir("#bin/GodotSharp").abspath, app_dir + "/Contents/Resources/GodotSharp")
shutil.copytree(Dir("#bin/RedotSharp").abspath, app_dir + "/Contents/Resources/RedotSharp")
version = get_build_version(False)
short_version = get_build_version(True)
with open(Dir("#misc/dist/macos").abspath + "/editor_info_plist.template", "rt", encoding="utf-8") as fin:
@@ -65,9 +65,9 @@ def generate_bundle(target, source, env):
subprocess.run(sign_command)
else:
# Template bundle.
app_prefix = "godot." + env["platform"]
rel_prefix = "godot." + env["platform"] + "." + "template_release"
dbg_prefix = "godot." + env["platform"] + "." + "template_debug"
app_prefix = "redot." + env["platform"]
rel_prefix = "redot." + env["platform"] + "." + "template_release"
dbg_prefix = "redot." + env["platform"] + "." + "template_debug"
if env.dev_build:
app_prefix += ".dev"
rel_prefix += ".dev"
@@ -90,9 +90,9 @@ def generate_bundle(target, source, env):
if not os.path.isdir(app_dir + "/Contents/MacOS"):
os.mkdir(app_dir + "/Contents/MacOS")
if rel_target_bin != "":
shutil.copy(rel_target_bin, app_dir + "/Contents/MacOS/godot_macos_release.universal")
shutil.copy(rel_target_bin, app_dir + "/Contents/MacOS/redot_macos_release.universal")
if dbg_target_bin != "":
shutil.copy(dbg_target_bin, app_dir + "/Contents/MacOS/godot_macos_debug.universal")
shutil.copy(dbg_target_bin, app_dir + "/Contents/MacOS/redot_macos_debug.universal")
# ZIP .app bundle.
zip_dir = Dir("#bin/" + (app_prefix + env.extra_suffix + env.module_version_string).replace(".", "_")).abspath