- {T("append"), imagex_capture_or_append, APPEND},
- {T("apply"), imagex_apply, APPLY},
- {T("capture"), imagex_capture_or_append, CAPTURE},
- {T("delete"), imagex_delete, DELETE},
- {T("dir"), imagex_dir, DIR},
- {T("export"), imagex_export, EXPORT},
- {T("extract"), imagex_extract, EXTRACT},
- {T("info"), imagex_info, INFO},
- {T("join"), imagex_join, JOIN},
- {T("mount"), imagex_mount_rw_or_ro, MOUNT},
- {T("mountrw"), imagex_mount_rw_or_ro, MOUNTRW},
- {T("optimize"),imagex_optimize, OPTIMIZE},
- {T("split"), imagex_split, SPLIT},
- {T("unmount"), imagex_unmount, UNMOUNT},
- {T("update"), imagex_update, UPDATE},
+ [CMD_APPEND] = {T("append"), imagex_capture_or_append},
+ [CMD_APPLY] = {T("apply"), imagex_apply},
+ [CMD_CAPTURE] = {T("capture"), imagex_capture_or_append},
+ [CMD_DELETE] = {T("delete"), imagex_delete},
+ [CMD_DIR ] = {T("dir"), imagex_dir},
+ [CMD_EXPORT] = {T("export"), imagex_export},
+ [CMD_EXTRACT] = {T("extract"), imagex_extract},
+ [CMD_INFO] = {T("info"), imagex_info},
+ [CMD_JOIN] = {T("join"), imagex_join},
+#if WIM_MOUNTING_SUPPORTED
+ [CMD_MOUNT] = {T("mount"), imagex_mount_rw_or_ro},
+ [CMD_MOUNTRW] = {T("mountrw"), imagex_mount_rw_or_ro},
+#endif
+ [CMD_OPTIMIZE] = {T("optimize"), imagex_optimize},
+ [CMD_SPLIT] = {T("split"), imagex_split},
+#if WIM_MOUNTING_SUPPORTED
+ [CMD_UNMOUNT] = {T("unmount"), imagex_unmount},
+#endif
+ [CMD_UPDATE] = {T("update"), imagex_update},
+};
+
+static const tchar *usage_strings[] = {
+[CMD_APPEND] =
+T(
+" %"TS" (DIRECTORY | NTFS_VOLUME) WIMFILE\n"
+" [IMAGE_NAME [IMAGE_DESCRIPTION]] [--boot]\n"
+" [--check] [--nocheck] [--compress-slow]\n"
+" [--flags EDITION_ID] [--verbose] [--dereference]\n"
+" [--config=FILE] [--threads=NUM_THREADS] [--source-list]\n"
+" [--no-acls] [--strict-acls] [--rpfix] [--norpfix]\n"
+" [--unix-data] [--pipable] [--update-of=[WIMFILE:]IMAGE]\n"
+),
+[CMD_APPLY] =
+T(
+" %"TS" WIMFILE [(IMAGE_NUM | IMAGE_NAME | all)]\n"
+" (DIRECTORY | NTFS_VOLUME) [--check] [--hardlink]\n"
+" [--symlink] [--verbose] [--ref=\"GLOB\"] [--unix-data]\n"
+" [--no-acls] [--strict-acls] [--rpfix] [--norpfix]\n"
+" [--include-invalid-names]\n"
+),
+[CMD_CAPTURE] =
+T(
+" %"TS" (DIRECTORY | NTFS_VOLUME) WIMFILE\n"
+" [IMAGE_NAME [IMAGE_DESCRIPTION]] [--boot]\n"
+" [--check] [--nocheck] [--compress=TYPE] [--compress-slow]\n"
+" [--flags EDITION_ID] [--verbose] [--dereference]\n"
+" [--config=FILE] [--threads=NUM_THREADS] [--source-list]\n"
+" [--no-acls] [--strict-acls] [--rpfix] [--norpfix]\n"
+" [--unix-data] [--pipable] [--update-of=[WIMFILE:]IMAGE]\n"
+" [--delta-from=WIMFILE]\n"
+),
+[CMD_DELETE] =
+T(
+" %"TS" WIMFILE (IMAGE_NUM | IMAGE_NAME | all) [--check]\n"
+" [--soft]\n"
+),
+[CMD_DIR] =
+T(
+" %"TS" WIMFILE (IMAGE_NUM | IMAGE_NAME | all) [--path=PATH]\n"
+),
+[CMD_EXPORT] =
+T(
+" %"TS" SRC_WIMFILE (SRC_IMAGE_NUM | SRC_IMAGE_NAME | all ) \n"
+" DEST_WIMFILE [DEST_IMAGE_NAME [DEST_IMAGE_DESCRIPTION]]\n"
+" [--boot] [--check] [--nocheck] [--compress=TYPE]\n"
+" [--ref=\"GLOB\"] [--threads=NUM_THREADS] [--rebuild]\n"
+" [--pipable] [--not-pipable]\n"
+),
+[CMD_EXTRACT] =
+T(
+" %"TS" WIMFILE (IMAGE_NUM | IMAGE_NAME) [PATH...]\n"
+" [--check] [--ref=\"GLOB\"] [--verbose] [--unix-data]\n"
+" [--no-acls] [--strict-acls] [--to-stdout]\n"
+" [--dest-dir=CMD_DIR] [--include-invalid-names]\n"
+),
+[CMD_INFO] =
+T(
+" %"TS" WIMFILE [(IMAGE_NUM | IMAGE_NAME) [NEW_NAME\n"
+" [NEW_DESC]]] [--boot] [--check] [--nocheck] [--header]\n"
+" [--lookup-table] [--xml] [--extract-xml FILE]\n"
+" [--metadata]\n"
+),
+[CMD_JOIN] =
+T(
+" %"TS" OUT_WIMFILE SPLIT_WIM_PART... [--check]\n"
+),
+#if WIM_MOUNTING_SUPPORTED
+[CMD_MOUNT] =
+T(
+" %"TS" WIMFILE [(IMAGE_NUM | IMAGE_NAME)] DIRECTORY\n"
+" [--check] [--debug] [--streams-interface=INTERFACE]\n"
+" [--ref=\"GLOB\"] [--unix-data] [--allow-other]\n"
+),
+[CMD_MOUNTRW] =
+T(
+" %"TS" WIMFILE [(IMAGE_NUM | IMAGE_NAME)] DIRECTORY\n"
+" [--check] [--debug] [--streams-interface=INTERFACE]\n"
+" [--staging-dir=CMD_DIR] [--unix-data] [--allow-other]\n"
+),
+#endif
+[CMD_OPTIMIZE] =
+T(
+" %"TS" WIMFILE [--check] [--nocheck] [--recompress]\n"
+" [--compress-slow] [--threads=NUM_THREADS]\n"
+" [--pipable] [--not-pipable]\n"
+),
+[CMD_SPLIT] =
+T(
+" %"TS" WIMFILE SPLIT_WIM_PART_1 PART_SIZE_MB [--check]\n"
+),
+#if WIM_MOUNTING_SUPPORTED
+[CMD_UNMOUNT] =
+T(
+" %"TS" DIRECTORY [--commit] [--check] [--rebuild] [--lazy]\n"
+),
+#endif
+[CMD_UPDATE] =
+T(
+" %"TS" WIMFILE [IMAGE_NUM | IMAGE_NAME] [--check] [--rebuild]\n"
+" [--threads=NUM_THREADS] [DEFAULT_ADD_OPTIONS]\n"
+" [DEFAULT_DELETE_OPTIONS] [--command=STRING] [< CMDFILE]\n"
+),