Skip to content

Commit 7071330

Browse files
committed
scripted-diff: Rename PACKAGE_* variables to CLIENT_*
This change ensures consistent use of the `CLIENT_` namespace everywhere in the repository. -BEGIN VERIFY SCRIPT- ren() { sed -i "s/\<$1\>/$2/g" $( git grep -l "$1" ./cmake ./src :\(exclude\)./src/secp256k1 ./test ) ; } ren PACKAGE_NAME CLIENT_NAME ren PACKAGE_VERSION CLIENT_VERSION_STRING ren PACKAGE_URL CLIENT_URL ren PACKAGE_BUGREPORT CLIENT_BUGREPORT -END VERIFY SCRIPT-
1 parent 332655c commit 7071330

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+115
-115
lines changed

cmake/bitcoin-build-config.h.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,16 @@
124124
#cmakedefine HAVE_VM_VM_PARAM_H 1
125125

126126
/* Define to the address where bug reports for this package should be sent. */
127-
#define PACKAGE_BUGREPORT "@CLIENT_BUGREPORT@"
127+
#define CLIENT_BUGREPORT "@CLIENT_BUGREPORT@"
128128

129129
/* Define to the full name of this package. */
130-
#define PACKAGE_NAME "@CLIENT_NAME@"
130+
#define CLIENT_NAME "@CLIENT_NAME@"
131131

132132
/* Define to the home page for this package. */
133-
#define PACKAGE_URL "@PROJECT_HOMEPAGE_URL@"
133+
#define CLIENT_URL "@PROJECT_HOMEPAGE_URL@"
134134

135135
/* Define to the version of this package. */
136-
#define PACKAGE_VERSION "@CLIENT_VERSION_STRING@"
136+
#define CLIENT_VERSION_STRING "@CLIENT_VERSION_STRING@"
137137

138138
/* Define to 1 if strerror_r returns char *. */
139139
#cmakedefine STRERROR_R_CHAR_P 1

src/addrdb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ bool CBanDB::Write(const banmap_t& banSet)
150150
bool CBanDB::Read(banmap_t& banSet)
151151
{
152152
if (fs::exists(m_banlist_dat)) {
153-
LogPrintf("banlist.dat ignored because it can only be read by " PACKAGE_NAME " version 22.x. Remove %s to silence this warning.\n", fs::quoted(fs::PathToString(m_banlist_dat)));
153+
LogPrintf("banlist.dat ignored because it can only be read by " CLIENT_NAME " version 22.x. Remove %s to silence this warning.\n", fs::quoted(fs::PathToString(m_banlist_dat)));
154154
}
155155
// If the JSON banlist does not exist, then recreate it
156156
if (!fs::exists(m_banlist_json)) {
@@ -215,7 +215,7 @@ util::Result<std::unique_ptr<AddrMan>> LoadAddrman(const NetGroupManager& netgro
215215
DumpPeerAddresses(args, *addrman);
216216
} catch (const std::exception& e) {
217217
return util::Error{strprintf(_("Invalid or corrupt peers.dat (%s). If you believe this is a bug, please report it to %s. As a workaround, you can move the file (%s) out of the way (rename, move, or delete) to have a new one created on the next start."),
218-
e.what(), PACKAGE_BUGREPORT, fs::quoted(fs::PathToString(path_addr)))};
218+
e.what(), CLIENT_BUGREPORT, fs::quoted(fs::PathToString(path_addr)))};
219219
}
220220
return addrman;
221221
}

src/addrman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ void AddrManImpl::Unserialize(Stream& s_)
253253
throw InvalidAddrManVersionError(strprintf(
254254
"Unsupported format of addrman database: %u. It is compatible with formats >=%u, "
255255
"but the maximum supported by this version of %s is %u.",
256-
uint8_t{format}, lowest_compatible, PACKAGE_NAME, uint8_t{FILE_FORMAT}));
256+
uint8_t{format}, lowest_compatible, CLIENT_NAME, uint8_t{FILE_FORMAT}));
257257
}
258258

259259
s >> nKey;

src/bitcoin-cli-res.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ BEGIN
1515
BLOCK "040904E4" // U.S. English - multilingual (hex)
1616
BEGIN
1717
VALUE "CompanyName", "Bitcoin"
18-
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for " PACKAGE_NAME ")"
19-
VALUE "FileVersion", PACKAGE_VERSION
18+
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for " CLIENT_NAME ")"
19+
VALUE "FileVersion", CLIENT_VERSION_STRING
2020
VALUE "InternalName", "bitcoin-cli"
2121
VALUE "LegalCopyright", COPYRIGHT_STR
2222
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
2323
VALUE "OriginalFilename", "bitcoin-cli.exe"
2424
VALUE "ProductName", "bitcoin-cli"
25-
VALUE "ProductVersion", PACKAGE_VERSION
25+
VALUE "ProductVersion", CLIENT_VERSION_STRING
2626
END
2727
END
2828

src/bitcoin-cli.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ static int AppInitRPC(int argc, char* argv[])
145145
return EXIT_FAILURE;
146146
}
147147
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
148-
std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n";
148+
std::string strUsage = CLIENT_NAME " RPC client version " + FormatFullVersion() + "\n";
149149

150150
if (gArgs.IsArgSet("-version")) {
151151
strUsage += FormatParagraph(LicenseInfo());
152152
} else {
153153
strUsage += "\n"
154-
"Usage: bitcoin-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n"
155-
"or: bitcoin-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n"
154+
"Usage: bitcoin-cli [options] <command> [params] Send command to " CLIENT_NAME "\n"
155+
"or: bitcoin-cli [options] -named <command> [name=value]... Send command to " CLIENT_NAME " (with named arguments)\n"
156156
"or: bitcoin-cli [options] help List commands\n"
157157
"or: bitcoin-cli [options] help <command> Get help for a command\n";
158158
strUsage += "\n" + gArgs.GetHelpMessage();
@@ -535,7 +535,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
535535
}
536536

537537
// Generate report header.
538-
std::string result{strprintf("%s client %s%s - server %i%s\n\n", PACKAGE_NAME, FormatFullVersion(), ChainToString(), networkinfo["protocolversion"].getInt<int>(), networkinfo["subversion"].get_str())};
538+
std::string result{strprintf("%s client %s%s - server %i%s\n\n", CLIENT_NAME, FormatFullVersion(), ChainToString(), networkinfo["protocolversion"].getInt<int>(), networkinfo["subversion"].get_str())};
539539

540540
// Report detailed peer connections list sorted by direction and minimum ping time.
541541
if (DetailsRequested() && !m_peers.empty()) {

src/bitcoin-tx-res.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ BEGIN
1616
BEGIN
1717
VALUE "CompanyName", "Bitcoin"
1818
VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
19-
VALUE "FileVersion", PACKAGE_VERSION
19+
VALUE "FileVersion", CLIENT_VERSION_STRING
2020
VALUE "InternalName", "bitcoin-tx"
2121
VALUE "LegalCopyright", COPYRIGHT_STR
2222
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
2323
VALUE "OriginalFilename", "bitcoin-tx.exe"
2424
VALUE "ProductName", "bitcoin-tx"
25-
VALUE "ProductVersion", PACKAGE_VERSION
25+
VALUE "ProductVersion", CLIENT_VERSION_STRING
2626
END
2727
END
2828

src/bitcoin-tx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int AppInitRawTx(int argc, char* argv[])
107107

108108
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
109109
// First part of help message is specific to this utility
110-
std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n";
110+
std::string strUsage = CLIENT_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n";
111111

112112
if (gArgs.IsArgSet("-version")) {
113113
strUsage += FormatParagraph(LicenseInfo());

src/bitcoin-util-res.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ BEGIN
1616
BEGIN
1717
VALUE "CompanyName", "Bitcoin"
1818
VALUE "FileDescription", "bitcoin-util (CLI Bitcoin utility)"
19-
VALUE "FileVersion", PACKAGE_VERSION
19+
VALUE "FileVersion", CLIENT_VERSION_STRING
2020
VALUE "InternalName", "bitcoin-util"
2121
VALUE "LegalCopyright", COPYRIGHT_STR
2222
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
2323
VALUE "OriginalFilename", "bitcoin-util.exe"
2424
VALUE "ProductName", "bitcoin-util"
25-
VALUE "ProductVersion", PACKAGE_VERSION
25+
VALUE "ProductVersion", CLIENT_VERSION_STRING
2626
END
2727
END
2828

src/bitcoin-util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static int AppInitUtil(ArgsManager& args, int argc, char* argv[])
5252

5353
if (HelpRequested(args) || args.IsArgSet("-version")) {
5454
// First part of help message is specific to this utility
55-
std::string strUsage = PACKAGE_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n";
55+
std::string strUsage = CLIENT_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n";
5656

5757
if (args.IsArgSet("-version")) {
5858
strUsage += FormatParagraph(LicenseInfo());

src/bitcoin-wallet-res.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ BEGIN
1515
BLOCK "040904E4" // U.S. English - multilingual (hex)
1616
BEGIN
1717
VALUE "CompanyName", "Bitcoin"
18-
VALUE "FileDescription", "bitcoin-wallet (CLI tool for " PACKAGE_NAME " wallets)"
19-
VALUE "FileVersion", PACKAGE_VERSION
18+
VALUE "FileDescription", "bitcoin-wallet (CLI tool for " CLIENT_NAME " wallets)"
19+
VALUE "FileVersion", CLIENT_VERSION_STRING
2020
VALUE "InternalName", "bitcoin-wallet"
2121
VALUE "LegalCopyright", COPYRIGHT_STR
2222
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
2323
VALUE "OriginalFilename", "bitcoin-wallet.exe"
2424
VALUE "ProductName", "bitcoin-wallet"
25-
VALUE "ProductVersion", PACKAGE_VERSION
25+
VALUE "ProductVersion", CLIENT_VERSION_STRING
2626
END
2727
END
2828

0 commit comments

Comments
 (0)