mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix erroneous macOS build bundle generation
(cherry picked from commit 3fa1a3e0f8)
This commit is contained in:
@@ -16,7 +16,7 @@ def generate_bundle(target, source, env):
|
|||||||
|
|
||||||
if env.editor_build:
|
if env.editor_build:
|
||||||
# Editor bundle.
|
# Editor bundle.
|
||||||
prefix = "godot." + env["platform"] + "." + env["target"]
|
prefix = "redot." + env["platform"] + "." + env["target"]
|
||||||
if env.dev_build:
|
if env.dev_build:
|
||||||
prefix += ".dev"
|
prefix += ".dev"
|
||||||
if env["precision"] == "double":
|
if env["precision"] == "double":
|
||||||
@@ -34,9 +34,9 @@ def generate_bundle(target, source, env):
|
|||||||
if not os.path.isdir(app_dir + "/Contents/MacOS"):
|
if not os.path.isdir(app_dir + "/Contents/MacOS"):
|
||||||
os.mkdir(app_dir + "/Contents/MacOS")
|
os.mkdir(app_dir + "/Contents/MacOS")
|
||||||
if target_bin != "":
|
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:
|
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)
|
version = get_build_version(False)
|
||||||
short_version = get_build_version(True)
|
short_version = get_build_version(True)
|
||||||
with open(Dir("#misc/dist/macos").abspath + "/editor_info_plist.template", "rt", encoding="utf-8") as fin:
|
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)
|
subprocess.run(sign_command)
|
||||||
else:
|
else:
|
||||||
# Template bundle.
|
# Template bundle.
|
||||||
app_prefix = "godot." + env["platform"]
|
app_prefix = "redot." + env["platform"]
|
||||||
rel_prefix = "godot." + env["platform"] + "." + "template_release"
|
rel_prefix = "redot." + env["platform"] + "." + "template_release"
|
||||||
dbg_prefix = "godot." + env["platform"] + "." + "template_debug"
|
dbg_prefix = "redot." + env["platform"] + "." + "template_debug"
|
||||||
if env.dev_build:
|
if env.dev_build:
|
||||||
app_prefix += ".dev"
|
app_prefix += ".dev"
|
||||||
rel_prefix += ".dev"
|
rel_prefix += ".dev"
|
||||||
@@ -90,9 +90,9 @@ def generate_bundle(target, source, env):
|
|||||||
if not os.path.isdir(app_dir + "/Contents/MacOS"):
|
if not os.path.isdir(app_dir + "/Contents/MacOS"):
|
||||||
os.mkdir(app_dir + "/Contents/MacOS")
|
os.mkdir(app_dir + "/Contents/MacOS")
|
||||||
if rel_target_bin != "":
|
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 != "":
|
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 .app bundle.
|
||||||
zip_dir = Dir("#bin/" + (app_prefix + env.extra_suffix + env.module_version_string).replace(".", "_")).abspath
|
zip_dir = Dir("#bin/" + (app_prefix + env.extra_suffix + env.module_version_string).replace(".", "_")).abspath
|
||||||
|
|||||||
Reference in New Issue
Block a user