5#include <bitcoin-build-config.h>
26#include <bitcoin-build-info.h>
36 #define BUILD_DESC BUILD_GIT_TAG
37 #define BUILD_SUFFIX ""
39 #define BUILD_DESC "v" CLIENT_VERSION_STRING
40 #if CLIENT_VERSION_IS_RELEASE
41 #define BUILD_SUFFIX ""
42 #elif defined(BUILD_GIT_COMMIT)
43 #define BUILD_SUFFIX "-" BUILD_GIT_COMMIT
44 #elif defined(GIT_COMMIT_ID)
45 #define BUILD_SUFFIX "-g" GIT_COMMIT_ID
47 #define BUILD_SUFFIX "-unk"
53 return strprintf(
"%d.%d.%d", nVersion / 10000, (nVersion / 100) % 100, nVersion % 100);
65std::string
FormatSubVersion(
const std::string&
name,
int nClientVersion,
const std::vector<std::string>& comments)
67 std::string comments_str;
68 if (!comments.empty()) comments_str =
strprintf(
"(%s)",
Join(comments,
"; "));
74 const auto copyright_devs =
strprintf(
_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION).translated;
75 std::string strCopyrightHolders = strPrefix + copyright_devs;
78 if (copyright_devs.find(
"Bitcoin Core") == std::string::npos) {
79 strCopyrightHolders +=
"\n" + strPrefix +
"The Bitcoin Core developers";
81 return strCopyrightHolders;
86 const std::string URL_SOURCE_CODE =
"<https://github.com/bitcoin/bitcoin>";
90 strprintf(
_(
"Please contribute if you find %s useful. "
91 "Visit %s for further information about the software."),
92 CLIENT_NAME,
"<" CLIENT_URL
">")
95 strprintf(
_(
"The source code is available from %s."), URL_SOURCE_CODE).translated +
98 _(
"This is experimental software.").
translated +
"\n" +
99 strprintf(
_(
"Distributed under the MIT software license, see the accompanying file %s or %s"),
"COPYING",
"<https://opensource.org/licenses/MIT>").translated +
std::string CopyrightHolders(const std::string &strPrefix)
std::string FormatSubVersion(const std::string &name, int nClientVersion, const std::vector< std::string > &comments)
Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip...
#define BUILD_DESC
git will put "#define GIT_COMMIT_ID ..." on the next line inside archives.
static std::string FormatVersion(int nVersion)
std::string FormatFullVersion()
const std::string UA_NAME("Satoshi")
Name of client reported in the 'version' message.
std::string LicenseInfo()
Returns licensing information (for -version)
auto Join(const C &container, const S &separator, UnaryOp unary_op)
Join all container items.
bilingual_str _(ConstevalStringLiteral str)
Translation function.