]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
wimlib-imagex: print version of library being used
[wimlib] / programs / imagex.c
index 5e7dc6dd862974bf6d7e023a1647e922d497d77e..28f0266356429b91879b6d1e59f421f435bcecf5 100644 (file)
@@ -4520,9 +4520,11 @@ static const tchar *get_cmd_string(int cmd, bool only_short_form)
 static void
 version(void)
 {
-       static const tchar * const s =
+       uint32_t vers = wimlib_get_version();
+
+       static const tchar * const fmt =
        T(
-"wimlib-imagex (distributed with " PACKAGE " " PACKAGE_VERSION ")\n"
+"wimlib-imagex " PACKAGE_VERSION " (using wimlib %u.%u.%u)\n"
 "Copyright (C) 2012-2017 Eric Biggers\n"
 "License GPLv3+; GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
 "This is free software: you are free to change and redistribute it.\n"
@@ -4530,7 +4532,8 @@ version(void)
 "\n"
 "Report bugs to "PACKAGE_BUGREPORT".\n"
        );
-       tfputs(s, stdout);
+       tfprintf(stdout, fmt,
+                vers >> 20, (vers >> 10) & 0x3ff, vers & 0x3ff);
 }