/tmp/bitcoin/src/common/license_info.cpp
Line | Count | Source |
1 | | // Copyright (c) The Bitcoin Core developers |
2 | | // Distributed under the MIT software license, see the accompanying |
3 | | // file COPYING or https://opensource.org/license/mit/. |
4 | | |
5 | | #include <bitcoin-build-config.h> // IWYU pragma: keep |
6 | | |
7 | | #include <common/license_info.h> |
8 | | |
9 | | #include <tinyformat.h> |
10 | | #include <util/translation.h> |
11 | | |
12 | | #include <string> |
13 | | |
14 | | std::string CopyrightHolders(const std::string& strPrefix) |
15 | 8 | { |
16 | 8 | const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION).translated; |
17 | 8 | std::string strCopyrightHolders = strPrefix + copyright_devs; |
18 | | |
19 | | // Make sure Bitcoin Core copyright is not removed by accident |
20 | 8 | if (copyright_devs.find("Bitcoin Core") == std::string::npos) { |
21 | 0 | strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers"; |
22 | 0 | } |
23 | 8 | return strCopyrightHolders; |
24 | 8 | } |
25 | | |
26 | | std::string LicenseInfo() |
27 | 8 | { |
28 | 8 | const std::string URL_SOURCE_CODE = "<https://github.com/bitcoin/bitcoin>"; |
29 | | |
30 | 8 | return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR).translated + " ") + "\n" + |
31 | 8 | "\n" + |
32 | 8 | strprintf(_("Please contribute if you find %s useful. " |
33 | 8 | "Visit %s for further information about the software."), |
34 | 8 | CLIENT_NAME, "<" CLIENT_URL ">") |
35 | 8 | .translated + |
36 | 8 | "\n" + |
37 | 8 | strprintf(_("The source code is available from %s."), URL_SOURCE_CODE).translated + |
38 | 8 | "\n" + |
39 | 8 | "\n" + |
40 | 8 | _("This is experimental software.") + "\n" + |
41 | 8 | strprintf(_("Distributed under the MIT software license, see the accompanying file %s or %s"), "COPYING", "<https://opensource.org/license/MIT>").translated + |
42 | 8 | "\n"; |
43 | 8 | } |