From ec1b3a44c0653e21dd252e1727ed42f86f0bb0ec Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 15 Dec 2017 00:48:35 +0100 Subject: Add support for custom version string Make nxproxy and nxagent print an arbitrary version number by running make NX_VERSION_CUSTOM="myvers". nxagent and nxproxy will then show this in addition to the original version number: NXPROXY - Version myvers (3.5.99.22) NXAGENT - Version myvers (3.5.99.22) Fixes ArcticaProject/nx-libs#606 --- nxcomp/src/Loop.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'nxcomp/src/Loop.cpp') diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index bb8a89d64..eb7373f9f 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -13308,13 +13308,18 @@ void PrintConnectionInfo() void PrintVersionInfo() { - cerr << "NXPROXY - " << "Version " + cerr << "NXPROXY - Version " +#ifdef NX_VERSION_CUSTOM + << NX_VERSION_CUSTOM << " (" +#endif << control -> LocalVersionMajor << "." << control -> LocalVersionMinor << "." << control -> LocalVersionPatch << "." - << control -> LocalVersionMaintenancePatch; - - cerr << endl; + << control -> LocalVersionMaintenancePatch +#ifdef NX_VERSION_CUSTOM + << ")" +#endif + << endl; } void PrintCopyrightInfo() -- cgit v1.2.3