mirror of https://github.com/godotengine/godot
Merge pull request #102003 from Meorge/app-bundle-date
Update the app bundle's access and modified times to match the build time on macOS
This commit is contained in:
commit
55c9dbc043
|
|
@ -33,7 +33,16 @@ def generate_bundle(target, source, env):
|
||||||
templ = Dir("#misc/dist/macos_tools.app").abspath
|
templ = Dir("#misc/dist/macos_tools.app").abspath
|
||||||
if os.path.exists(app_dir):
|
if os.path.exists(app_dir):
|
||||||
shutil.rmtree(app_dir)
|
shutil.rmtree(app_dir)
|
||||||
shutil.copytree(templ, app_dir, ignore=shutil.ignore_patterns("Contents/Info.plist"))
|
|
||||||
|
# Create the .app bundle directory itself from scratch so that the creation
|
||||||
|
# date is accurate, but copy the rest of the template over.
|
||||||
|
os.mkdir(app_dir)
|
||||||
|
shutil.copytree(
|
||||||
|
os.path.join(templ, "Contents"),
|
||||||
|
os.path.join(app_dir, "Contents"),
|
||||||
|
ignore=shutil.ignore_patterns("Info.plist"),
|
||||||
|
)
|
||||||
|
|
||||||
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 != "":
|
||||||
|
|
@ -66,6 +75,7 @@ def generate_bundle(target, source, env):
|
||||||
sign_command += [Dir("#misc/dist/macos").abspath + "/editor.entitlements"]
|
sign_command += [Dir("#misc/dist/macos").abspath + "/editor.entitlements"]
|
||||||
sign_command += [app_dir]
|
sign_command += [app_dir]
|
||||||
subprocess.run(sign_command)
|
subprocess.run(sign_command)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Template bundle.
|
# Template bundle.
|
||||||
app_prefix = "godot." + env["platform"]
|
app_prefix = "godot." + env["platform"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue