# define WIMLIB_WIM_PATH_SEPARATOR_STRING "/"
#endif
+/** Use this to specify the root directory of the WIM image. */
+#define WIMLIB_WIM_ROOT_PATH WIMLIB_WIM_PATH_SEPARATOR_STRING
+
+/** Use this to test if the specified path refers to the root directory of the
+ * WIM image. */
+#define WIMLIB_IS_WIM_ROOT_PATH(path) \
+ ((path)[0] == WIMLIB_WIM_PATH_SEPARATOR && \
+ (path)[1] == 0)
+
#ifdef __GNUC__
# define _wimlib_deprecated __attribute__((deprecated))
#else
/** A file in the WIM image is being replaced as a result of a
* ::wimlib_add_command without ::WIMLIB_ADD_FLAG_NO_REPLACE specified.
- * This is only received when ::WIMLIB_ADD_FLAG_VERBOSE is also
- * specified in the add command. */
+ * @p info will point to ::wimlib_progress_info.replace. This is only
+ * received when ::WIMLIB_ADD_FLAG_VERBOSE is also specified in the add
+ * command. */
WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM,
+
+ /** A WIM image is being applied with ::WIMLIB_EXTRACT_FLAG_WIMBOOT, and
+ * a file is being extracted normally (not as a WIMBoot "pointer file")
+ * due to it matching a pattern in the [PrepopulateList] section of the
+ * configuration file \Windows\System32\WimBootCompress.ini in the WIM
+ * image. @info will point to ::wimlib_progress_info.wimboot_exclude.
+ */
+ WIMLIB_PROGRESS_MSG_WIMBOOT_EXCLUDE,
};
/** A pointer to this union is passed to the user-supplied
int32_t compression_type;
/** Number of split WIM parts from which streams are being
- * written (may be 0 if irrelevant). */
+ * written (may be 0 if irrelevant). */
uint32_t total_parts;
- /** Number of split WIM parts from which streams have been
- * written (may be 0 if irrelevant). */
+ /** This is currently broken and will always be 0. */
uint32_t completed_parts;
} write_streams;
union {
/** Target path in the WIM image. Only valid on
* messages ::WIMLIB_PROGRESS_MSG_SCAN_BEGIN and
- * ::WIMLIB_PROGRESS_MSG_SCAN_END. If capturing a full
- * image, this will be the empty string; otherwise it
- * will name the place in the WIM image at which the
- * directory tree is being added. */
+ * ::WIMLIB_PROGRESS_MSG_SCAN_END. */
const wimlib_tchar *wim_target_path;
/** For ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY and a status
* data stream, or a reparse data buffer. */
uint64_t num_streams;
- /** This will be the empty string. */
- const wimlib_tchar *extract_root_wim_source_path;
+ /** Reserved. */
+ const wimlib_tchar *reserved_2;
/** Currently only used for
* ::WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN. */
/** Path to the file in the WIM image that is being replaced */
const wimlib_tchar *path_in_wim;
} replace;
+
+ /** Valid on messages ::WIMLIB_PROGRESS_MSG_WIMBOOT_EXCLUDE */
+ struct wimlib_progress_info_wimboot_exclude {
+ /** Path to the file in the WIM image */
+ const wimlib_tchar *path_in_wim;
+
+ /** Path to which the file is being extracted */
+ const wimlib_tchar *extraction_path;
+ } wimboot_exclude;
};
/** A user-supplied function that will be called periodically during certain WIM
* filesystem to be included in the WIM image. */
wimlib_tchar *fs_source_path;
- /** Destination path in the WIM image. Leading and trailing slashes are
- * ignored. The empty string or @c NULL means the root directory of the
- * WIM image. */
+ /** Destination path in the WIM image. Use ::WIMLIB_WIM_ROOT_PATH to
+ * specify the root directory of the WIM image. */
wimlib_tchar *wim_target_path;
/** Reserved; set to 0. */
/** Data for a ::WIMLIB_UPDATE_OP_ADD operation. */
struct wimlib_add_command {
- /** Filesystem path to the file or directory tree to
- * add. */
+ /** Filesystem path to the file or directory tree to add. */
wimlib_tchar *fs_source_path;
- /** Path, specified from the root of the WIM image, at
- * which to add the file or directory tree within the
- * WIM image. */
+
+ /** Destination path in the WIM image. Use ::WIMLIB_WIM_ROOT_PATH to
+ * specify the root directory of the WIM image. */
wimlib_tchar *wim_target_path;
/** Path to capture configuration file to use, or @c NULL for default.
/** Data for a ::WIMLIB_UPDATE_OP_DELETE operation. */
struct wimlib_delete_command {
- /** Path, specified from the root of the WIM image, for
- * the file or directory tree within the WIM image to be
- * deleted. */
+
+ /** Path, specified from the root of the WIM image, for the file or
+ * directory tree within the WIM image to be deleted. */
wimlib_tchar *wim_path;
- /** Bitwise OR of WIMLIB_DELETE_FLAG_* flags. */
+
+ /** Bitwise OR of WIMLIB_DELETE_FLAG_* flags. */
int delete_flags;
};
/** Data for a ::WIMLIB_UPDATE_OP_RENAME operation. */
struct wimlib_rename_command {
- /** Path, specified from the root of the WIM image, for
- * the source file or directory tree within the WIM
- * image. */
+
+ /** Path, specified from the root of the WIM image, for the source file
+ * or directory tree within the WIM image. */
wimlib_tchar *wim_source_path;
- /** Path, specified from the root of the WIM image, for
- * the destination file or directory tree within the WIM
- * image. */
+
+ /** Path, specified from the root of the WIM image, for the destination
+ * file or directory tree within the WIM image. */
wimlib_tchar *wim_target_path;
- /** Reserved; set to 0. */
+
+ /** Reserved; set to 0. */
int rename_flags;
};