forked from mirrors/gstreamer-rs
Move Gir.toml into the corresponding subdirectories
This commit is contained in:
parent
ff64c6606a
commit
f657a56947
18 changed files with 53 additions and 44 deletions
29
generator.py
29
generator.py
|
@ -66,29 +66,38 @@ def build_gir_if_needed(updated_submodule):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def regen_crates(path, level=0):
|
||||||
|
for entry in listdir(path):
|
||||||
|
entry_file = join(path, entry)
|
||||||
|
if isdir(entry_file):
|
||||||
|
if level < 2 and not regen_crates(entry_file, level + 1):
|
||||||
|
return False
|
||||||
|
elif entry == 'Gir.toml':
|
||||||
|
print('==> Regenerating "{}"...'.format(entry_file))
|
||||||
|
|
||||||
def regen_crates():
|
args = ['./gir/target/release/gir', '-c', entry_file, '-o', path, '-d', 'gir-files']
|
||||||
for entry in [f for f in listdir('.') if isfile(join('.', f))]:
|
if level > 1:
|
||||||
if entry.startswith('Gir_Gst') and entry.endswith('.toml'):
|
args.append('-m')
|
||||||
print('==> Regenerating "{}"...'.format(entry))
|
args.append('sys')
|
||||||
|
error = False
|
||||||
try:
|
try:
|
||||||
run_command(['./gir/target/release/gir', '-c', entry])
|
error = run_command(args) is False
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
print('The following error occurred: {}'.format(err))
|
print('The following error occurred: {}'.format(err))
|
||||||
|
error = True
|
||||||
|
if error is True:
|
||||||
line = input('Do you want to continue? [y/N] ').strip().lower()
|
line = input('Do you want to continue? [y/N] ').strip().lower()
|
||||||
if line != 'y':
|
if line != 'y':
|
||||||
sys.exit(1)
|
return False
|
||||||
print('<== Done!')
|
print('<== Done!')
|
||||||
|
return True
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if def_check_submodule("gir-files") == FAILURE:
|
|
||||||
return 1
|
|
||||||
if not build_gir_if_needed(def_check_submodule("gir")):
|
if not build_gir_if_needed(def_check_submodule("gir")):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
print('=> Regenerating crates...')
|
print('=> Regenerating crates...')
|
||||||
if not regen_crates():
|
if not regen_crates("."):
|
||||||
return 1
|
return 1
|
||||||
if not run_command(['cargo', 'fmt']):
|
if not run_command(['cargo', 'fmt']):
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstApp"
|
library = "GstApp"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-app"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstAudio"
|
library = "GstAudio"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-audio"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstBase"
|
library = "GstBase"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-base"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstCheck"
|
library = "GstCheck"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-check"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstController"
|
library = "GstController"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-controller"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GES"
|
library = "GES"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-editing-services"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstGL"
|
library = "GstGL"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.14"
|
min_cfg_version = "1.14"
|
||||||
target_path = "gstreamer-gl"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstNet"
|
library = "GstNet"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-net"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstPbutils"
|
library = "GstPbutils"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-pbutils"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstPlayer"
|
library = "GstPlayer"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.12"
|
min_cfg_version = "1.12"
|
||||||
target_path = "gstreamer-player"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstRtp"
|
library = "GstRtp"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-rtp"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstRtspServer"
|
library = "GstRtspServer"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-rtsp-server"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstRtsp"
|
library = "GstRtsp"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-rtsp"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstSdp"
|
library = "GstSdp"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-sdp"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send"
|
concurrency = "send"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstVideo"
|
library = "GstVideo"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer-video"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "GstWebRTC"
|
library = "GstWebRTC"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.14"
|
min_cfg_version = "1.14"
|
||||||
target_path = "gstreamer-webrtc"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
|
@ -1,9 +1,9 @@
|
||||||
[options]
|
[options]
|
||||||
girs_dir = "gir-files"
|
girs_dir = "../gir-files"
|
||||||
library = "Gst"
|
library = "Gst"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
min_cfg_version = "1.8"
|
min_cfg_version = "1.8"
|
||||||
target_path = "gstreamer"
|
target_path = "."
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
Loading…
Reference in a new issue