diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-08-04 14:00:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-04 12:00:15 +0000 |
commit | b366a02318def70948f8ff6ed321e433b721ece4 (patch) | |
tree | 432b2621b703d8adcac554b348954a864a25af1c /python/servo/package_commands.py | |
parent | 8052027dd497241157fc74365c5c78fde028b8a0 (diff) | |
download | servo-b366a02318def70948f8ff6ed321e433b721ece4.tar.gz servo-b366a02318def70948f8ff6ed321e433b721ece4.zip |
build: Speed up first run after build on macOS (#32928)
GStreamer has to process plugins each time they are added when
initializing. When those files have changed, this triggers macOS
security protections which can add many seconds to access time. This
change eliminates that problem after the first packaging of libraries by
skipping packaging if everything is up-to-date and not overwriting the
dylibs everytime.
In addition, it moves a lot of the code for packaging GStreamer
libraries on macOS into the `gstreamer` module and adds type-safety and
comments to the Python.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'python/servo/package_commands.py')
-rw-r--r-- | python/servo/package_commands.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index a9470b7b372..284f2df86ef 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -22,6 +22,7 @@ import shutil import subprocess import sys +import servo.gstreamer from mach.decorators import ( CommandArgument, CommandProvider, @@ -38,8 +39,6 @@ from servo.command_base import ( is_macosx, is_windows, ) -from servo.build_commands import copy_dependencies -from servo.gstreamer import macos_gst_root from servo.util import delete, get_target_dir PACKAGES = { @@ -218,10 +217,9 @@ class PackageCommands(CommandBase): change_prefs(dir_to_resources, "macosx") - print("Finding dylibs and relinking") + print("Packaging GStreamer...") dmg_binary = path.join(content_dir, "servo") - dir_to_gst_lib = path.join(macos_gst_root(), 'lib', '') - copy_dependencies(dmg_binary, lib_dir, dir_to_gst_lib) + servo.gstreamer.package_gstreamer_dylibs(dmg_binary, lib_dir) print("Adding version to Credits.rtf") version_command = [binary_path, '--version'] |