print('/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :', file=f)
def dependencies(target, options):
- deps = [('libdcp', 'v1.9.24', {'c++17': target.platform.startswith('osx')})]
+ deps = [('libdcp', 'v1.9.25', {'c++17': target.platform.startswith('osx')})]
deps.append(('libsub', 'v1.6.52'))
deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
deps.append(('rtaudio', 'f619b76'))
verify_warnings.xml: verifier.py $(LIBDCP_DEPS)
python3 verifier.py $(LIBDCP) WARNING > $@
+verify_ok.xml: verifier.py $(LIBDCP_DEPS)
+ python3 verifier.py $(LIBDCP) OK > $@
#
# HTML
#
-html: $(XML) config.xml shortcuts.xml verify_errors.xml verify_bv21_errors.xml verify_warnings.xml \
+html: $(XML) config.xml shortcuts.xml verify_errors.xml verify_bv21_errors.xml verify_warnings.xml verify_ok.xml \
dcpomatic-html.xsl extensions-html.ent dcpomatic.css dcpomatic_create.xml dcpomatic_cli.xml dcpomatic_kdm_cli.xml \
$(subst .pdf,.png,$(addprefix html/screenshots/,$(SCREENSHOTS))) \
$(subst .svg,.png,$(addprefix diagrams/,$(DIAGRAMS))) \
# PDF
#
-pdf: $(XML) config.xml shortcuts.xml verify_errors.xml verify_bv21_errors.xml verify_warnings.xml \
+pdf: $(XML) config.xml shortcuts.xml verify_errors.xml verify_bv21_errors.xml verify_warnings.xml verify_ok.xml \
dcpomatic-pdf.xsl extensions-pdf.ent dcpomatic_create.xml dcpomatic_cli.xml dcpomatic_kdm_cli.xml \
$(addprefix screenshots/,$(SCREENSHOTS)) \
$(subst .svg,.pdf,$(addprefix diagrams/,$(DIAGRAMS)))
<listitem><emphasis>Warnings</emphasis> — small problems that may not matter.</listitem>
</itemizedlist>
+ <para>
+ It will also report some ‘good’ things, which have been checked and found to be in order.
+ </para>
+
<para>
The following sections list what the verifier checks for in each category.
</para>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="verify_warnings.xml"/>
</section>
+ <section>
+ <title>Good things</title>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="verify_ok.xml"/>
+ </section>
+
</chapter>
#!/usr/bin/python3
+#
+# Return DocBook markup for all the verification warnings/errors/"ok" notes of a given
+# type in verify.h
from pathlib import Path
import re
import subprocess
if len(sys.argv) < 3:
- print(f"Syntax: {sys.argv[0]} <path-to-libdcp-source-tree> <ERROR|BV21_ERROR|WARNING>")
+ print(f"Syntax: {sys.argv[0]} <path-to-libdcp-source-tree> <ERROR|BV21_ERROR|WARNING|OK>")
sys.exit(1)
libdcp = Path(sys.argv[1])
type = sys.argv[2]
header = libdcp / "src" / "verify.h"
-types = ("BV21_ERROR", "ERROR", "WARNING")
+# The types of note we have, and the strings to look for in order to recognise them
+types = {
+ "BV21_ERROR": ("BV21_ERROR", "bv21_error("),
+ "ERROR": ("ERROR", "error("),
+ "WARNING": ("WARNING", "warning("),
+ "OK": ("ok(",),
+}
def find_type(name):
"""
Search source code to find where a given code is used and hence find out whether
- it represents an error, Bv2.1 "error" or warning.
+ it represents an error, Bv2.1 "error", warning or "this is OK" note.
"""
previous = ''
- for source in ["verify_j2k.cc", "dcp.cc", "verify.cc"]:
+ for source in ["verify_j2k.cc", "dcp.cc", "verify.cc", "cpl.cc"]:
path = libdcp / "src" / source
with open(path) as s:
for line in s:
if line.find(name) != -1:
line_with_previous = previous + line
- for t in types:
- if line_with_previous.find(t) != -1:
- return t
- assert False
+ for type, signatures in types.items():
+ for s in signatures:
+ if line_with_previous.find(s) != -1:
+ return type
previous = line
+ assert False
print('<itemizedlist>')
text = strip.replace('/**', '').replace('*/', '').strip()
elif not strip.startswith('/*') and not strip.startswith('*') and strip.endswith(','):
this_type = find_type(strip[:-1])
+ # print("find", strip[:-1], this_type)
if this_type == type:
text = re.sub(r"\[.*?\]", lambda m: f'(Bv2.1 {m[0][7:-1]})', text)
text = text.replace('<', '<')