Merge pull request #116092 from bruvzg/bundle_id
[macOS] Add build name to bundle ID.
This commit is contained in:
commit
8ab854a7ca
1 changed files with 7 additions and 5 deletions
|
|
@ -4,7 +4,8 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from platform_methods import get_build_version, lipo
|
from methods import get_version_info
|
||||||
|
from platform_methods import lipo
|
||||||
|
|
||||||
|
|
||||||
def generate_bundle(target, source, env):
|
def generate_bundle(target, source, env):
|
||||||
|
|
@ -44,13 +45,14 @@ def generate_bundle(target, source, env):
|
||||||
shutil.copy(target_bin, app_dir + "/Contents/MacOS/Godot")
|
shutil.copy(target_bin, app_dir + "/Contents/MacOS/Godot")
|
||||||
if "mono" in env.module_version_string:
|
if "mono" in env.module_version_string:
|
||||||
shutil.copytree(env.Dir("#bin/GodotSharp").abspath, app_dir + "/Contents/Resources/GodotSharp")
|
shutil.copytree(env.Dir("#bin/GodotSharp").abspath, app_dir + "/Contents/Resources/GodotSharp")
|
||||||
version = get_build_version(False)
|
version = get_version_info("", True)
|
||||||
short_version = get_build_version(True)
|
|
||||||
with open(env.Dir("#misc/dist/macos").abspath + "/editor_info_plist.template", "rt", encoding="utf-8") as fin:
|
with open(env.Dir("#misc/dist/macos").abspath + "/editor_info_plist.template", "rt", encoding="utf-8") as fin:
|
||||||
with open(app_dir + "/Contents/Info.plist", "wt", encoding="utf-8", newline="\n") as fout:
|
with open(app_dir + "/Contents/Info.plist", "wt", encoding="utf-8", newline="\n") as fout:
|
||||||
for line in fin:
|
for line in fin:
|
||||||
line = line.replace("$version", version)
|
line = line.replace("$version", "{major}.{minor}.{patch}.{status}.{build}".format(**version))
|
||||||
line = line.replace("$short_version", short_version)
|
line = line.replace("$short_version", "{major}.{minor}.{patch}".format(**version))
|
||||||
|
if version["build"] != "official" and version["build"] != "steam":
|
||||||
|
line = line.replace("org.godotengine.godot", "org.godotengine.godot." + version["build"])
|
||||||
fout.write(line)
|
fout.write(line)
|
||||||
|
|
||||||
# Sign .app bundle.
|
# Sign .app bundle.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue