Also avoid throwing if a data stream is empty so that you can still read
the schematic/pcb/library
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20301
(cherry picked from commit a6fbf4bbdbc7e08c815a4b28f14a99be48aee621)
The symbol library embedded files were implicit, which made them hard to
work with. Adding the panel makes it clearer and setting the panel
correctly to the callback ensures that the structure is updated on
close.
Adds some copy/move semantics for EMBEDDED_FILES to take advantage of
how the multiple copies are handled in the library editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18935
Each editor needs the embedded files tab in the
schematic/pcb/symbol/footprint settings. But the footprint may add an
embedded file from the 3d models tab and symbols/footprints may add
embedded files from the grid. This should be immediately visible in the
embedded files tab. Additionally, removing the reference to an embedded
file in the grid or 3d models now removes the embedded file as well.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18934
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
Also fixes a bug where the pretty printer didn't insert
linebreaks for a forest (it assumed a single tree root).
Also further regularises bool and quote formatting.
This drags in dsnlexer.h to everything that uses EMBEDDED_FILES, but the
parser is actually only used in two files. It's not the only thing to
drag it in, though.
Currently, touching dsnlexer.h rebuilds nearly 800 files, when it
actually is needed by about 50 at most.
SHA256 is fine for one-offs but for large libraries where we might be
running the hash on hundreds of files, the speed difference is
appreciable. We don't require crytographic hashing, just a check that
the original file hasn't been corrupted so Murmur3 satisfies our basic
requirement.
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures. File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.
kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document. Embeds are allowed in schematics, boards,
symbols and footprints. Currently supported embeddings are Datasheets,
3D Models and drawingsheets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6918
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2376
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827