5#include <bitcoin-build-config.h>
27#include <bitcoin-build-info.h>
38 #define BUILD_DESC BUILD_GIT_TAG
39 #define BUILD_SUFFIX ""
41 #define BUILD_DESC "v" CLIENT_VERSION_STRING
42 #if CLIENT_VERSION_IS_RELEASE
43 #define BUILD_SUFFIX ""
44 #elif defined(BUILD_GIT_COMMIT)
45 #define BUILD_SUFFIX "-" BUILD_GIT_COMMIT
46 #elif defined(GIT_COMMIT_ID)
47 #define BUILD_SUFFIX "-g" GIT_COMMIT_ID
49 #define BUILD_SUFFIX "-unk"
55 return strprintf(
"%d.%d.%d", nVersion / 10000, (nVersion / 100) % 100, nVersion % 100);
67std::string
FormatSubVersion(
const std::string&
name,
int nClientVersion,
const std::vector<std::string>& comments)
69 std::string comments_str;
70 if (!comments.empty()) comments_str =
strprintf(
"(%s)",
Join(comments,
"; "));
76 const auto copyright_devs =
strprintf(
_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION).translated;
77 std::string strCopyrightHolders = strPrefix + copyright_devs;
80 if (copyright_devs.find(
"Bitcoin Core") == std::string::npos) {
81 strCopyrightHolders +=
"\n" + strPrefix +
"The Bitcoin Core developers";
83 return strCopyrightHolders;
88 const std::string URL_SOURCE_CODE =
"<https://github.com/bitcoin/bitcoin>";
92 strprintf(
_(
"Please contribute if you find %s useful. "
93 "Visit %s for further information about the software."),
94 CLIENT_NAME,
"<" CLIENT_URL
">")
97 strprintf(
_(
"The source code is available from %s."), URL_SOURCE_CODE).translated +
100 _(
"This is experimental software.") +
"\n" +
101 strprintf(
_(
"Distributed under the MIT software license, see the accompanying file %s or %s"),
"COPYING",
"<https://opensource.org/license/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...
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.
consteval auto _(util::TranslatedLiteral str)