]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
Allow retrieving PACKAGE_VERSION from the library
[wimlib] / programs / imagex.c
index 5e7dc6dd862974bf6d7e023a1647e922d497d77e..10f5455692af4753d9a17cd9eab800a58cbf9e17 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2012-2017 Eric Biggers
+ * Copyright (C) 2012-2018 Eric Biggers
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -4520,20 +4520,19 @@ static const tchar *get_cmd_string(int cmd, bool only_short_form)
 static void
 version(void)
 {
-       static const tchar * const s =
+       static const tchar * const fmt =
        T(
-"wimlib-imagex (distributed with " PACKAGE " " PACKAGE_VERSION ")\n"
-"Copyright (C) 2012-2017 Eric Biggers\n"
+"wimlib-imagex " PACKAGE_VERSION " (using wimlib %"TS")\n"
+"Copyright (C) 2012-2018 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"
 "There is NO WARRANTY, to the extent permitted by law.\n"
 "\n"
 "Report bugs to "PACKAGE_BUGREPORT".\n"
        );
-       tfputs(s, stdout);
+       tfprintf(stdout, fmt, wimlib_get_version_string());
 }
 
-
 static void
 do_common_options(int *argc_p, tchar **argv, int cmd)
 {