diff options
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/bootstrap.py | 11 | ||||
-rw-r--r-- | python/servo/bootstrap_commands.py | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py index 7bfa80bd8f4..d6d9dc1d1e6 100644 --- a/python/servo/bootstrap.py +++ b/python/servo/bootstrap.py @@ -18,8 +18,8 @@ from servo.util import extract, download_file, host_triple def check_gstreamer_lib(): - subprocess.call(["pkg-config", "gstreamer-1.0 >= 1.12"], - stdout=PIPE, stderr=PIPE) == 0 + return subprocess.call(["pkg-config", "gstreamer-1.0 >= 1.12"], + stdout=PIPE, stderr=PIPE) == 0 def run_as_root(command): if os.geteuid() != 0: @@ -56,7 +56,12 @@ def install_salt_dependencies(context, force): install_linux_deps(context, pkgs_apt, pkgs_dnf, force) def gstreamer(context, force=False): - pass + cur = os.curdir + gstdir = os.path.join(cur, "support", "linux", "gstreamer") + if not os.path.isdir(os.path.join(gstdir, "gstreamer", "lib")): + os.chdir(gstdir) + subprocess.call(["bash", "gstreamer.sh"]) + os.chdir(cur) def linux(context, force=False): # Please keep these in sync with the packages in README.md diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 66508c5b959..84978737b64 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -64,6 +64,15 @@ class MachCommands(CommandBase): def bootstrap_salt(self, force=False): return bootstrap.bootstrap(self.context, force=force, specific="salt") + @Command('bootstrap-gstreamer', + description='Set up a local copy of the gstreamer libraries (linux only).', + category='bootstrap') + @CommandArgument('--force', '-f', + action='store_true', + help='Boostrap without confirmation') + def bootstrap_gstreamer(self, force=False): + return bootstrap.bootstrap(self.context, force=force, specific="gstreamer") + @Command('bootstrap-android', description='Install the Android SDK and NDK.', category='bootstrap') |