Generalized support for referencing resources in external WIMs
authorEric Biggers <ebiggers3@gmail.com>
Tue, 20 Aug 2013 00:17:36 +0000 (19:17 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 20 Aug 2013 00:28:38 +0000 (19:28 -0500)
commitda295f258b60e1593de305385c0669eac4b76644
tree3c6af4be503d44a1e4257570346b1c40bd3e9993
parent4a1c54ca01dc3a5af6410383e67e5378a9a1369d
Generalized support for referencing resources in external WIMs

In preparation for supporting "delta" WIMs, this commit generalizes the library
interface for handling split WIMs.

Instead of cluttering up various functions with additional split WIM parameters,
there is now a function wimlib_reference_resource_files() available that can
load additional resources (e.g. from a split WIM part) into a WIMStruct that has
metadata available (e.g. the first part of a split WIM, or a standalone WIM).

wimlib_reference_resource_files() can handle file globbing by itself, so it
actually makes it easier for library users to process split WIMs.

Lower-level APIs wimlib_reference_resources() and wimlib_unreference_resources()
are also provided, but not yet used directly by `wimlib-imagex'.

Some instances of WIMLIB_ERR_SPLIT_UNSUPPORTED error returns were changed to
the new error code WIMLIB_ERR_METADATA_NOT_FOUND.

This commit also re-writes wimlib_export_image() to correctly roll back changes
on multi-image exports and better handle resources in the source WIM being
missing, as well as add a flag to make all destination image(s) unnamed.
31 files changed:
Makefile.am
NEWS
doc/imagex-apply.1.in
doc/imagex-export.1.in
doc/imagex-extract.1.in
doc/imagex-mount.1.in
include/wimlib.h
include/wimlib/glob.h [new file with mode: 0644]
include/wimlib/lookup_table.h
include/wimlib/swm.h [deleted file]
include/wimlib/wim.h
include/wimlib_tchar.h
programs/imagex-win32.c
programs/imagex-win32.h
programs/imagex.c
src/dentry.c
src/export_image.c
src/extract.c
src/integrity.c
src/join.c
src/lookup_table.c
src/mount_image.c
src/split.c
src/swm.c [deleted file]
src/util.c
src/wim.c
src/win32_apply.c
src/win32_capture.c
src/win32_replacements.c
src/write.c
src/xml.c