mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
Set GST_VALIDATE_APPS_DIR GES validate app path
This commit is contained in:
parent
bf1aa16608
commit
5903bbc0a3
3 changed files with 105 additions and 0 deletions
99
configure
vendored
Executable file
99
configure
vendored
Executable file
|
@ -0,0 +1,99 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Script for generating the Makefiles."""
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
PROJECTNAME = "GStreamer 'all'"
|
||||||
|
|
||||||
|
ROOTDIR = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
MAKEFILE_TMPL = """all:
|
||||||
|
%(tab)scd %(build_dir)s && %(ninja)s -k 100; %(ninja)s
|
||||||
|
|
||||||
|
install:
|
||||||
|
%(tab)scd %(build_dir)s && DESTDIR="${DESTDIR}" %(ninja)s install
|
||||||
|
|
||||||
|
check:
|
||||||
|
%(tab)scd %(build_dir)s && %(ninja)s test
|
||||||
|
|
||||||
|
uninstalled:
|
||||||
|
%(tab)scd %(build_dir)s && %(ninja)s uninstalled
|
||||||
|
|
||||||
|
clean:
|
||||||
|
%(tab)srm -Rf %(build_dir)s
|
||||||
|
%(tab)srm Makefile
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def accept_command(commands):
|
||||||
|
"""Checks if @command --version works."""
|
||||||
|
for command in commands:
|
||||||
|
try:
|
||||||
|
subprocess.check_output([command, "--version"])
|
||||||
|
return command
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def get_configs(meson):
|
||||||
|
meson_version = subprocess.check_output([meson, '--version']).decode().strip()
|
||||||
|
if meson_version <= '0.33.0':
|
||||||
|
print("Disabling the introspection as support for the introspection with subproject was introduced in 0.34")
|
||||||
|
return ['-Dgstreamer:disable_introspection=true',
|
||||||
|
'-Dgst-editing-services:disable_introspection=true',
|
||||||
|
'-Dgst-devtools:disable_introspection=true']
|
||||||
|
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def configure_meson(args):
|
||||||
|
"""Configures meson and generate the Makefile."""
|
||||||
|
meson = accept_command(["meson", "meson.py"])
|
||||||
|
if not meson:
|
||||||
|
print("Install mesonbuild to build %s: http://mesonbuild.com/\n"
|
||||||
|
"You can simply install it with:\n"
|
||||||
|
" $ sudo pip3 install meson" % PROJECTNAME)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
ninja = accept_command(["ninja", "ninja-build"])
|
||||||
|
if not ninja:
|
||||||
|
print("Install ninja-build to build %s: https://ninja-build.org/"
|
||||||
|
% PROJECTNAME)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
build_dir = os.path.join(ROOTDIR, "build")
|
||||||
|
shutil.rmtree(build_dir, True)
|
||||||
|
os.mkdir(build_dir)
|
||||||
|
os.chdir(build_dir)
|
||||||
|
|
||||||
|
try:
|
||||||
|
subprocess.check_call([meson, "../"] + args + get_configs(meson))
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
with open(os.path.join(ROOTDIR, "Makefile"), "w") as makefile:
|
||||||
|
makefile.write(MAKEFILE_TMPL %
|
||||||
|
{"build_dir": build_dir,
|
||||||
|
"ninja": ninja,
|
||||||
|
"tab": " "})
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
parser = argparse.ArgumentParser(description='Process some integers.')
|
||||||
|
parser.add_argument("--no-reconfigure", action='store_true',
|
||||||
|
default=False, help='Avoid removing the build dir'
|
||||||
|
' if not necessary.')
|
||||||
|
options, args = parser.parse_known_args()
|
||||||
|
if options.no_reconfigure:
|
||||||
|
if os.path.exists(
|
||||||
|
ROOTDIR + "/build/build.ninja") and os.path.exists(
|
||||||
|
ROOTDIR + "/Makefile"):
|
||||||
|
print("Not reconfiguring")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
|
configure_meson(args)
|
|
@ -61,6 +61,8 @@ def get_subprocess_env(options):
|
||||||
"%s/subprojects/gst-devtools/validate/data/scenarios" % SCRIPTDIR)
|
"%s/subprojects/gst-devtools/validate/data/scenarios" % SCRIPTDIR)
|
||||||
env["GST_VALIDATE_PLUGIN_PATH"] = os.path.normpath(
|
env["GST_VALIDATE_PLUGIN_PATH"] = os.path.normpath(
|
||||||
"%s/subprojects/gst-devtools/validate/plugins" % options.builddir)
|
"%s/subprojects/gst-devtools/validate/plugins" % options.builddir)
|
||||||
|
env["GST_VALIDATE_APPS_DIR"] = os.path.normpath(
|
||||||
|
"%s/subprojects/gst-editing-services/tests/validate" % SCRIPTDIR)
|
||||||
prepend_env_var(env, "PATH", os.path.normpath(
|
prepend_env_var(env, "PATH", os.path.normpath(
|
||||||
"%s/subprojects/gst-devtools/validate/tools" % options.builddir))
|
"%s/subprojects/gst-devtools/validate/tools" % options.builddir))
|
||||||
env["PATH"] += os.pathsep + PATH
|
env["PATH"] += os.pathsep + PATH
|
||||||
|
|
4
subprojects/gst-python.wrap
Normal file
4
subprojects/gst-python.wrap
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[wrap-git]
|
||||||
|
directory=gst-python
|
||||||
|
url=git://anongit.freedesktop.org/gstreamer/gst-python
|
||||||
|
revision=master
|
Loading…
Reference in a new issue