X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib.h;h=b95fc71976e7413293409ca6d44863ee4562fb70;hb=5ede6282b6f28fcd71d6eb556dae69e83d925e11;hp=9d3c96160dddf269f31f081db821199892655a56;hpb=269f10a27c62027d48c0ba58f164d20e3bf3cf85;p=wimlib diff --git a/include/wimlib.h b/include/wimlib.h index 9d3c9616..b95fc719 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -392,6 +392,15 @@ typedef char wimlib_tchar; # 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 @@ -567,9 +576,18 @@ enum wimlib_progress_msg { /** 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 @@ -653,11 +671,10 @@ union wimlib_progress_info { 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; @@ -703,10 +720,7 @@ union wimlib_progress_info { 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 @@ -824,8 +838,8 @@ union wimlib_progress_info { * 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. */ @@ -925,6 +939,15 @@ union wimlib_progress_info { /** 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 @@ -950,9 +973,8 @@ struct wimlib_capture_source { * 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. */ @@ -1803,12 +1825,11 @@ enum wimlib_update_op { /** 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. @@ -1821,25 +1842,27 @@ struct wimlib_add_command { /** 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; };