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 <twoerner@gmail.com>
This commit is contained in:
Trevor Woerner 2017-03-23 00:01:43 -04:00
parent 5b7562f2de
commit 3af06dfb26

View File

@ -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);