From e0356cd07d19557df7ae7ac1de5bda7eb9ede001 Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Sun, 30 Apr 2017 21:18:17 +0200 Subject: [PATCH] add file version.h - add file with version number - add version number to the terminal output --- cli-miner.cpp | 3 ++- jpsock.cpp | 3 ++- version.h | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 version.h diff --git a/cli-miner.cpp b/cli-miner.cpp index 38fb720..70a5228 100644 --- a/cli-miner.cpp +++ b/cli-miner.cpp @@ -27,6 +27,7 @@ #include "console.h" #include "donate-level.h" #include "autoAdjust.hpp" +#include "version.h" #ifndef CONF_NO_HTTPD # include "httpd.h" @@ -133,7 +134,7 @@ int main(int argc, char *argv[]) #endif printer::inst()->print_str("-------------------------------------------------------------------\n"); - printer::inst()->print_str("XMR-Stak-CPU mining software, CPU Version.\n"); + printer::inst()->print_str( XMR_STAK_NAME" " XMR_STAK_VERSION " mining software, CPU Version.\n"); printer::inst()->print_str("Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).\n"); printer::inst()->print_str("Brought to you by fireice_uk and psychocrypt under GPLv3.\n\n"); char buffer[64]; diff --git a/jpsock.cpp b/jpsock.cpp index 913f916..d179f2a 100644 --- a/jpsock.cpp +++ b/jpsock.cpp @@ -32,8 +32,9 @@ #include "jext.h" #include "socks.h" #include "socket.h" +#include "version.h" -#define AGENTID_STR "xmr-stak-cpu/1.3.1" +#define AGENTID_STR XMR_STAK_NAME "/" XMR_STAK_VERSION using namespace rapidjson; diff --git a/version.h b/version.h new file mode 100644 index 0000000..c579f98 --- /dev/null +++ b/version.h @@ -0,0 +1,4 @@ +#pragma once + +#define XMR_STAK_NAME "xmr-stak-cpu" +#define XMR_STAK_VERSION "1.4.1-dev"