mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-17 05:41:41 +02:00
Versioning final version
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
xmrstak/version.hpp export-subst
|
||||
xmrstak/version.cpp export-subst
|
||||
|
||||
@@ -85,7 +85,7 @@ void help()
|
||||
cout<<" -u, --user USERNAME pool user name or wallet address"<<endl;
|
||||
cout<<" -p, --pass PASSWD pool password, in the most cases x or empty \"\""<<endl;
|
||||
cout<<" \n"<<endl;
|
||||
cout<<XMR_STAK_NAME << " " << XMR_STAK_VERSION << " " << GIT_COMMIT_HASH << " " << GIT_BRANCH << endl;
|
||||
cout<< "Version: " << get_version_str_short() << endl;
|
||||
cout<<"Brought to by fireice_uk and psychocrypt under GPLv3."<<endl;
|
||||
}
|
||||
|
||||
@@ -433,17 +433,18 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
printer::inst()->print_str("-------------------------------------------------------------------\n");
|
||||
printer::inst()->print_str( XMR_STAK_NAME" " XMR_STAK_VERSION " mining software.\n");
|
||||
printer::inst()->print_str(get_version_str_short().c_str());
|
||||
printer::inst()->print_str("\n\n");
|
||||
printer::inst()->print_str("Brought to you by fireice_uk and psychocrypt under GPLv3.\n");
|
||||
printer::inst()->print_str("Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).\n");
|
||||
#ifndef CONF_NO_CUDA
|
||||
printer::inst()->print_str("NVIDIA mining code was written by KlausT and psychocrypt.\n");
|
||||
printer::inst()->print_str("Original NVIDIA mining code was written by KlausT and psychocrypt.\n");
|
||||
#endif
|
||||
#ifndef CONF_NO_OPENCL
|
||||
printer::inst()->print_str("AMD mining code was written by wolf9466.\n");
|
||||
printer::inst()->print_str("Original mining code was written by wolf9466.\n");
|
||||
#endif
|
||||
printer::inst()->print_str("Brought to you by fireice_uk and psychocrypt under GPLv3.\n\n");
|
||||
char buffer[64];
|
||||
snprintf(buffer, sizeof(buffer), "Configurable dev donation level is set to %.1f %%\n\n", fDevDonationLevel * 100.0);
|
||||
snprintf(buffer, sizeof(buffer), "\nConfigurable dev donation level is set to %.1f%%\n\n", fDevDonationLevel * 100.0);
|
||||
printer::inst()->print_str(buffer);
|
||||
printer::inst()->print_str("You can use following keys to display reports:\n");
|
||||
printer::inst()->print_str("'h' - hashrate\n");
|
||||
|
||||
@@ -509,8 +509,8 @@ bool jpsock::cmd_login()
|
||||
{
|
||||
char cmd_buffer[1024];
|
||||
|
||||
snprintf(cmd_buffer, sizeof(cmd_buffer), "{\"method\":\"login\",\"params\":{\"login\":\"%s\",\"pass\":\"%s\",\"agent\":\"" AGENTID_STR "\"},\"id\":1}\n",
|
||||
usr_login.c_str(), usr_pass.c_str());
|
||||
snprintf(cmd_buffer, sizeof(cmd_buffer), "{\"method\":\"login\",\"params\":{\"login\":\"%s\",\"pass\":\"%s\",\"agent\":\"%s\"},\"id\":1}\n",
|
||||
usr_login.c_str(), usr_pass.c_str(), get_version_str().c_str());
|
||||
|
||||
opq_json_val oResult(nullptr);
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#include "version.hpp"
|
||||
|
||||
//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$
|
||||
#if defined(GIT_ARCHIVE) && !defined(GIT_COMMIT_HASH)
|
||||
#define GIT_COMMIT_HASH "$Format:%h$"
|
||||
#endif
|
||||
|
||||
#ifndef GIT_COMMIT_HASH
|
||||
#define GIT_COMMIT_HASH "0000000"
|
||||
#endif
|
||||
|
||||
#ifndef GIT_BRANCH
|
||||
#define GIT_BRANCH "unknown"
|
||||
#endif
|
||||
|
||||
#define XMR_STAK_NAME "xmr-stak"
|
||||
#define XMR_STAK_VERSION "2.0.0"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define OS_TYPE "win"
|
||||
#elif defined(__APPLE__)
|
||||
#define OS_TYPE "mac"
|
||||
#elif defined(__FreeBSD__)
|
||||
#define OS_TYPE "bsd"
|
||||
#elif defined(__linux__)
|
||||
#define OS_TYPE "lin"
|
||||
#else
|
||||
#define OS_TYPE "unk"
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_NO_CUDA) && !defined(CONF_NO_OPENCL)
|
||||
#define BACKEND_TYPE "cpu-nvidia-amd"
|
||||
#elif !defined(CONF_NO_OPENCL)
|
||||
#define BACKEND_TYPE "cpu-amd"
|
||||
#elif !defined(CONF_NO_CUDA)
|
||||
#define BACKEND_TYPE "cpu-nvidia"
|
||||
#else
|
||||
#define BACKEND_TYPE "cpu"
|
||||
#endif
|
||||
|
||||
#if defined(CONF_NO_AEON)
|
||||
#define COIN_TYPE "monero"
|
||||
#elif defined(CONF_NO_MONERO)
|
||||
#define COIN_TYPE "aeon"
|
||||
#else
|
||||
#define COIN_TYPE "aeon-monero"
|
||||
#endif
|
||||
|
||||
#define VERSION_LONG XMR_STAK_NAME "/" XMR_STAK_VERSION "/" GIT_COMMIT_HASH "/" GIT_BRANCH "/" OS_TYPE "/" BACKEND_TYPE "/" COIN_TYPE "/"
|
||||
#define VERSION_SHORT XMR_STAK_NAME " " XMR_STAK_VERSION " " GIT_COMMIT_HASH
|
||||
|
||||
const char ver_long[] = VERSION_LONG;
|
||||
const char ver_short[] = VERSION_SHORT;
|
||||
+12
-12
@@ -1,17 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$
|
||||
#if defined(GIT_ARCHIVE) && !defined(GIT_COMMIT_HASH)
|
||||
#define GIT_COMMIT_HASH "$Format:%h$"
|
||||
#endif
|
||||
#include <string>
|
||||
#include "donate-level.hpp"
|
||||
|
||||
#ifndef GIT_COMMIT_HASH
|
||||
#define GIT_COMMIT_HASH "0000000"
|
||||
#endif
|
||||
extern const char ver_long[];
|
||||
extern const char ver_short[];
|
||||
|
||||
#ifndef GIT_BRANCH
|
||||
#define GIT_BRANCH "unknown"
|
||||
#endif
|
||||
inline std::string get_version_str()
|
||||
{
|
||||
return std::string(ver_long) + std::to_string(uint(fDevDonationLevel * 1000)) ;
|
||||
}
|
||||
|
||||
#define XMR_STAK_NAME "xmr-stak"
|
||||
#define XMR_STAK_VERSION "2.0.0-predev"
|
||||
inline std::string get_version_str_short()
|
||||
{
|
||||
return std::string(ver_short);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user