Skip to content

Commit d5f4683

Browse files
committed
Unify package name to as few places as possible without major changes
1 parent 348b281 commit d5f4683

29 files changed

+106
-58
lines changed

build-aux/m4/bitcoin_find_bdb48.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
3838
done
3939
if test "x$bdbpath" = "xX"; then
4040
AC_MSG_RESULT([no])
41-
AC_MSG_ERROR([libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
41+
AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
4242
elif test "x$bdb48path" = "xX"; then
4343
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
4444
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
@@ -60,7 +60,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
6060
])
6161
done
6262
if test "x$BDB_LIBS" = "x"; then
63-
AC_MSG_ERROR([libdb_cxx missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
63+
AC_MSG_ERROR([libdb_cxx missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
6464
fi
6565
AC_SUBST(BDB_LIBS)
6666
])

build-aux/m4/bitcoin_qt.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
220220
221221
222222
dnl enable qt support
223-
AC_MSG_CHECKING(whether to build Bitcoin Core GUI)
223+
AC_MSG_CHECKING(whether to build ]AC_PACKAGE_NAME[ GUI)
224224
BITCOIN_QT_CHECK([
225225
bitcoin_enable_qt=yes
226226
bitcoin_enable_qt_test=yes

libbitcoinconsensus.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exec_prefix=@exec_prefix@
33
libdir=@libdir@
44
includedir=@includedir@
55

6-
Name: Bitcoin Core consensus library
6+
Name: @PACKAGE_NAME@ consensus library
77
Description: Library for the Bitcoin consensus protocol.
88
Version: @PACKAGE_VERSION@
99
Libs: -L${libdir} -lbitcoinconsensus

share/qt/Info.plist.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<string>APPL</string>
1818

1919
<key>CFBundleGetInfoString</key>
20-
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers</string>
20+
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@, Copyright © 2009-@COPYRIGHT_YEAR@ The @PACKAGE_NAME@ developers</string>
2121

2222
<key>CFBundleShortVersionString</key>
2323
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@</string>

share/qt/extract_strings_qt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def parse_po(text):
7070
#endif
7171
""")
7272
f.write('static const char UNUSED *bitcoin_strings[] = {\n')
73+
f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('PACKAGE_NAME'),))
7374
messages.sort(key=operator.itemgetter(0))
7475
for (msgid, msgstr) in messages:
7576
if msgid != EMPTY:

share/setup.nsi.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SetCompressor /SOLID lzma
66
# General Symbol Definitions
77
!define REGKEY "SOFTWARE\$(^Name)"
88
!define VERSION @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@
9-
!define COMPANY "Bitcoin Core project"
9+
!define COMPANY "@PACKAGE_NAME@ project"
1010
!define URL http://www.bitcoin.org/
1111

1212
# MUI Symbol Definitions
@@ -59,7 +59,7 @@ XPStyle on
5959
BrandingText " "
6060
ShowInstDetails show
6161
VIProductVersion ${VERSION}.@CLIENT_VERSION_BUILD@
62-
VIAddVersionKey ProductName "Bitcoin Core"
62+
VIAddVersionKey ProductName "@PACKAGE_NAME@"
6363
VIAddVersionKey ProductVersion "${VERSION}"
6464
VIAddVersionKey CompanyName "${COMPANY}"
6565
VIAddVersionKey CompanyWebsite "${URL}"

src/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ clean-local:
448448

449449
.rc.o:
450450
@test -f $(WINDRES)
451-
$(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@
451+
## FIXME: How to get the appropriate modulename_CPPFLAGS in here?
452+
$(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@
452453

453454
.mm.o:
454455
$(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \

src/Makefile.qt.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ SECONDARY: $(QT_QM)
382382

383383
qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
384384
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
385-
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^
385+
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" ../share/qt/extract_strings_qt.py $^
386386

387387
translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
388388
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"

src/bitcoin-cli-res.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ BEGIN
1717
BLOCK "040904E4" // U.S. English - multilingual (hex)
1818
BEGIN
1919
VALUE "CompanyName", "Bitcoin"
20-
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for Bitcoin Core)"
20+
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for " PACKAGE_NAME ")"
2121
VALUE "FileVersion", VER_FILEVERSION_STR
2222
VALUE "InternalName", "bitcoin-cli"
2323
VALUE "LegalCopyright", COPYRIGHT_STR

src/bitcoin-cli.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6+
#if defined(HAVE_CONFIG_H)
7+
#include "config/bitcoin-config.h"
8+
#endif
9+
610
#include "chainparamsbase.h"
711
#include "clientversion.h"
812
#include "rpcclient.h"
@@ -68,10 +72,10 @@ static bool AppInitRPC(int argc, char* argv[])
6872
//
6973
ParseParameters(argc, argv);
7074
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
71-
std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
75+
std::string strUsage = strprintf(_("%s RPC client version"), _(PACKAGE_NAME)) + " " + FormatFullVersion() + "\n";
7276
if (!mapArgs.count("-version")) {
7377
strUsage += "\n" + _("Usage:") + "\n" +
74-
" bitcoin-cli [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
78+
" bitcoin-cli [options] <command> [params] " + strprintf(_("Send command to %s"), _(PACKAGE_NAME)) + "\n" +
7579
" bitcoin-cli [options] help " + _("List commands") + "\n" +
7680
" bitcoin-cli [options] help <command> " + _("Get help for a command") + "\n";
7781

0 commit comments

Comments
 (0)