mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
Add a way to simply update sources and document it
This commit is contained in:
parent
525d8dab14
commit
422875b276
3 changed files with 68 additions and 9 deletions
25
README.md
25
README.md
|
@ -16,13 +16,28 @@ These libraries are needed for clutter-sharp to compile:
|
|||
|
||||
Building & Installing
|
||||
----
|
||||
With meson:
|
||||
|
||||
meson build && ninja -C build/
|
||||
I
|
||||
HACKING
|
||||
-------
|
||||
|
||||
With Autotools:
|
||||
While hacking on the code generator or the `.metadata` files, you will
|
||||
need to force code regeneration with `ninja update-code`, a full rebuild
|
||||
is triggered right after.
|
||||
|
||||
./autogen.sh --prefix=/usr && make install
|
||||
Updating to new GStreamer version
|
||||
--------------------------------
|
||||
|
||||
* Make sure [bindinator] is installed on the system
|
||||
|
||||
Make sure you are in an environement where latest `.gir` files are available (either install
|
||||
or through the `$GI_TYPELIB_PATH` env var).
|
||||
|
||||
ninja -C update-all
|
||||
|
||||
* Verify newly generated code and `git add` files in `sources/generated/` and `ges/generated`
|
||||
* Commit
|
||||
|
||||
Supported Platforms
|
||||
----
|
||||
|
@ -49,6 +64,6 @@ License
|
|||
----
|
||||
gstreamer-sharp is licensed under the [LGPL 2.1](https://www.gnu.org/licenses/lgpl-2.1.html)
|
||||
|
||||
[bindinator]:https://github.com/gtk-sharp/bindinator
|
||||
[gtk-sharp]:https://github.com/gtk-sharp/gtk-sharp
|
||||
[bindinator]:https://github.com/GLibSharp/bindinator
|
||||
[gtk-sharp]:https://github.com/GLibSharp/GtlSharp
|
||||
[gstreamer]: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/
|
||||
|
|
10
meson.build
10
meson.build
|
@ -159,19 +159,21 @@ custom_target('GstSharp-nuget',
|
|||
subdir('samples')
|
||||
|
||||
bindinate = find_program('bindinate', required: false)
|
||||
|
||||
if bindinate.found()
|
||||
run_target('update-bindings',
|
||||
run_target('bindinate_gstreamer',
|
||||
command: [bindinate,
|
||||
'--name=gstreamer', '--regenerate=true',
|
||||
'--merge-with=GstApp-1.0,GstAudio-1.0,GstBase-1.0,GstController-1.0,GstFft-1.0,GstNet-1.0,GstPbutils-1.0,GstRiff-1.0,GstRtp-1.0,GstRtsp-1.0,GstSdp-1.0,GstTag-1.0,GstVideo-1.0',
|
||||
'--gir=Gst-1.0']
|
||||
)
|
||||
python3 = import('python3').find_python()
|
||||
run_target('update-ges-bindings',
|
||||
run_target('bindinate_ges',
|
||||
command: ['sh', '-c',
|
||||
'''bindinate --name=gst-editing-services --regenerate=true --gir=GES-1.0 && mv @0@/sources/gst-editing-services-sharp-api.raw @0@/ges/gst-editing-services-api.raw '''.format(
|
||||
meson.current_source_dir())
|
||||
]
|
||||
)
|
||||
python3 = import('python3').find_python()
|
||||
run_target('update-code', command: [find_program('update_sources.py')])
|
||||
run_target('update-all', command: [find_program('update_sources.py'), 'bindinate'])
|
||||
endif
|
||||
|
||||
|
|
42
update_sources.py
Normal file
42
update_sources.py
Normal file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
def accept_command(commands):
|
||||
"""Search @commands and returns the first found absolute path."""
|
||||
for command in commands:
|
||||
command = shutil.which(command)
|
||||
if command:
|
||||
return command
|
||||
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
ninja = accept_command(["ninja", "ninja-build"])
|
||||
buildroot = os.environ["MESON_BUILD_ROOT"]
|
||||
|
||||
bindinate = False
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "bindinate":
|
||||
bindinate = True
|
||||
|
||||
print("Building all code")
|
||||
subprocess.check_call([ninja, "-C", buildroot])
|
||||
|
||||
if bindinate:
|
||||
print("Bindinate GStreamer")
|
||||
subprocess.check_call([ninja, "-C", buildroot, "bindinate_gstreamer"])
|
||||
|
||||
print("Update GStreamer bindings")
|
||||
subprocess.check_call([ninja, "-C", buildroot, "update_gstreamer_code"])
|
||||
|
||||
if bindinate:
|
||||
print("Bindinate GES")
|
||||
subprocess.check_call([ninja, "-C", buildroot, "bindinate_ges"])
|
||||
print("Update GES bindings")
|
||||
subprocess.check_call([ninja, "-C", buildroot, "update_ges_code"])
|
||||
|
||||
print("Building all code")
|
||||
subprocess.check_call([ninja, "-C", buildroot])
|
Loading…
Reference in a new issue