From 3af06dfb268446bc6149f0abe0370dc6a93409e7 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Thu, 23 Mar 2017 00:01:43 -0400 Subject: [PATCH] main.cpp: take version information from autotool configuration The autotool configuration needs to know the version of the project, so instead of forcing the developer to maintain two version strings and keep them synchronized, allow the code to take the version string from the autotool configuration automatically. Hence, only one version needs to be maintained which is shared between the autotool configuration and the code. Signed-off-by: Trevor Woerner --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 6da93ec..0b04ef8 100644 --- a/main.cpp +++ b/main.cpp @@ -13,6 +13,7 @@ #include "RKComm.h" #include "RKDevice.h" #include "RKImage.h" +#include "config.h" extern const char *szManufName[]; CRKLog *g_pLogObject=NULL; CONFIG_ITEM_VECTOR g_ConfigItemVec; @@ -758,7 +759,7 @@ bool handle_command(int argc, char* argv[], CRKScan *pScan) usage(); return true; } else if(strcmp(strCmd.c_str(), "-V") == 0) { - printf("rkDevelopTool ver 1.0\r\n"); + printf("rkDevelopTool ver %s\r\n", PACKAGE_VERSION); return true; } cnt = pScan->Search(RKUSB_MASKROM | RKUSB_LOADER);