diff Applications/ApplicationToolbox.cpp @ 8:62adabb8c122

Provide "--version" in command-line tools
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Oct 2016 16:53:54 +0200
parents bc3ca410b765
children 8e1dfd531335
line wrap: on
line diff
--- a/Applications/ApplicationToolbox.cpp	Wed Oct 26 15:42:52 2016 +0200
+++ b/Applications/ApplicationToolbox.cpp	Wed Oct 26 16:53:54 2016 +0200
@@ -176,5 +176,19 @@
         throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
       }
     }
+
+
+    void PrintVersion(const char* path)
+    {
+      std::cout
+        << path << " " << ORTHANC_WSI_VERSION << std::endl
+        << "Copyright (C) 2012-2016 Sebastien Jodogne, "
+        << "Medical Physics Department, University Hospital of Liege (Belgium)" << std::endl
+        << "Licensing AGPL: GNU AGPL version 3 or later <http://gnu.org/licenses/gpl.html>." << std::endl
+        << "This is free software: you are free to change and redistribute it." << std::endl
+        << "There is NO WARRANTY, to the extent permitted by law." << std::endl
+        << std::endl
+        << "Written by Sebastien Jodogne <s.jodogne@gmail.com>" << std::endl;
+    }
   }
 }