Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ target/
/guix-build-*

/ci/scratch/
Xcode-*.tar
14 changes: 7 additions & 7 deletions cmake/module/GenerateSetupNsi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ function(generate_setup_nsi)
set(abs_top_srcdir ${PROJECT_SOURCE_DIR})
set(abs_top_builddir ${PROJECT_BINARY_DIR})
set(CLIENT_URL ${PROJECT_HOMEPAGE_URL})
set(CLIENT_TARNAME "bitcoin")
set(CLIENT_TARNAME "namecoin")
set(BITCOIN_WRAPPER_NAME "bitcoin")
set(BITCOIN_GUI_NAME "bitcoin-qt")
set(BITCOIN_DAEMON_NAME "bitcoind")
set(BITCOIN_CLI_NAME "bitcoin-cli")
set(BITCOIN_TX_NAME "bitcoin-tx")
set(BITCOIN_WALLET_TOOL_NAME "bitcoin-wallet")
set(BITCOIN_TEST_NAME "test_bitcoin")
set(BITCOIN_GUI_NAME "namecoin-qt")
set(BITCOIN_DAEMON_NAME "namecoind")
set(BITCOIN_CLI_NAME "namecoin-cli")
set(BITCOIN_TX_NAME "namecoin-tx")
set(BITCOIN_WALLET_TOOL_NAME "namecoin-wallet")
set(BITCOIN_TEST_NAME "test_namecoin")
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY)
endfunction()
80 changes: 52 additions & 28 deletions cmake/module/Maintenance.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,32 @@ function(setup_split_debug_script)
endif()
endfunction()

function(add_maintenance_targets)
if(NOT TARGET Python3::Interpreter)
return()
endif()

foreach(target IN ITEMS bitcoin namecoind namecoin-node namecoin-qt namecoin-gui namecoin-cli namecoin-tx namecoin-util namecoin-wallet test_namecoin bench_namecoin)
if(TARGET ${target})
list(APPEND executables $<TARGET_FILE:${target}>)
endif()
endforeach()

add_custom_target(check-symbols
COMMAND ${CMAKE_COMMAND} -E echo "Running symbol and dynamic library checks..."
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables}
VERBATIM
)

add_custom_target(check-security
COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..."
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables}
VERBATIM
)
endfunction()

function(add_windows_deploy_target)
if(MINGW AND TARGET bitcoin AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
if(MINGW AND TARGET bitcoin AND TARGET namecoin-qt AND TARGET namecoind AND TARGET namecoin-cli AND TARGET namecoin-tx AND TARGET namecoin-wallet AND TARGET namecoin-util AND TARGET test_namecoin)
find_program(MAKENSIS_EXECUTABLE makensis)
if(NOT MAKENSIS_EXECUTABLE)
add_custom_target(deploy
Expand All @@ -36,13 +60,13 @@ function(add_windows_deploy_target)
OUTPUT ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/release
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-qt> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-qt>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoind> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoind>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-cli> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-cli>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-tx> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-tx>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-wallet>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-util>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:namecoin-qt> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:namecoin-qt>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:namecoind> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:namecoind>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:namecoin-cli> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:namecoin-cli>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:namecoin-tx> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:namecoin-tx>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:namecoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:namecoin-wallet>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:namecoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:namecoin-util>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_namecoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_namecoin>
COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
VERBATIM
)
Expand All @@ -51,50 +75,50 @@ function(add_windows_deploy_target)
endfunction()

function(add_macos_deploy_target)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND TARGET bitcoin-qt)
set(macos_app "Bitcoin-Qt.app")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND TARGET namecoin-qt)
set(macos_app "Namecoin-Qt.app")
# Populate Contents subdirectory.
configure_file(${PROJECT_SOURCE_DIR}/share/qt/Info.plist.in ${macos_app}/Contents/Info.plist NO_SOURCE_PERMISSIONS)
file(CONFIGURE OUTPUT ${macos_app}/Contents/PkgInfo CONTENT "APPL????")
# Populate Contents/Resources subdirectory.
file(CONFIGURE OUTPUT ${macos_app}/Contents/Resources/empty.lproj CONTENT "")
configure_file(${PROJECT_SOURCE_DIR}/src/qt/res/icons/bitcoin.icns ${macos_app}/Contents/Resources/bitcoin.icns NO_SOURCE_PERMISSIONS COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/src/qt/res/icons/namecoin.icns ${macos_app}/Contents/Resources/namecoin.icns NO_SOURCE_PERMISSIONS COPYONLY)
file(CONFIGURE OUTPUT ${macos_app}/Contents/Resources/Base.lproj/InfoPlist.strings
CONTENT "{ CFBundleDisplayName = \"@CLIENT_NAME@\"; CFBundleName = \"@CLIENT_NAME@\"; }"
)

add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
COMMAND ${CMAKE_COMMAND} --install ${PROJECT_BINARY_DIR} --config $<CONFIG> --component bitcoin-qt --prefix ${macos_app}/Contents/MacOS --strip
COMMAND ${CMAKE_COMMAND} -E rename ${macos_app}/Contents/MacOS/bin/$<TARGET_FILE_NAME:bitcoin-qt> ${macos_app}/Contents/MacOS/Bitcoin-Qt
OUTPUT ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Namecoin-Qt
COMMAND ${CMAKE_COMMAND} --install ${PROJECT_BINARY_DIR} --config $<CONFIG> --component namecoin-qt --prefix ${macos_app}/Contents/MacOS --strip
COMMAND ${CMAKE_COMMAND} -E rename ${macos_app}/Contents/MacOS/bin/$<TARGET_FILE_NAME:namecoin-qt> ${macos_app}/Contents/MacOS/Namecoin-Qt
COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/bin
COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/share
VERBATIM
)

set(macos_zip "bitcoin-macos-app")
string(REPLACE " " "-" osx_volname ${CLIENT_NAME})
if(CMAKE_HOST_APPLE)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/${macos_zip}.zip
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} -translations-dir=${QT_TRANSLATIONS_DIR} -zip=${macos_zip}
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
OUTPUT ${PROJECT_BINARY_DIR}/${osx_volname}.zip
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Namecoin-Qt
VERBATIM
)
add_custom_target(deploydir
DEPENDS ${PROJECT_BINARY_DIR}/${macos_zip}.zip
DEPENDS ${PROJECT_BINARY_DIR}/${osx_volname}.zip
)
add_custom_target(deploy
DEPENDS ${PROJECT_BINARY_DIR}/${macos_zip}.zip
DEPENDS ${PROJECT_BINARY_DIR}/${osx_volname}.zip
)
else()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} -translations-dir=${QT_TRANSLATIONS_DIR}
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Namecoin-Qt
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Namecoin-Qt
VERBATIM
)
add_custom_target(deploydir
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Namecoin-Qt
)

find_program(ZIP_EXECUTABLE zip)
Expand All @@ -104,17 +128,17 @@ function(add_macos_deploy_target)
)
else()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_zip}.zip
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
WORKING_DIRECTORY dist
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${macos_zip}.zip
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${osx_volname}.zip
VERBATIM
)
add_custom_target(deploy
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_zip}.zip
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
)
endif()
endif()
add_dependencies(deploydir bitcoin-qt)
add_dependencies(deploydir namecoin-qt)
add_dependencies(deploy deploydir)
endif()
endfunction()
2 changes: 1 addition & 1 deletion contrib/guix/libexec/build.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ mkdir -p "$DISTSRC"
;;
*darwin*)
cmake --build build --target deploy ${V:+--verbose}
mv build/dist/bitcoin-macos-app.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
mv build/dist/Namecoin-Core.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
mkdir -p "unsigned-app-${HOST}"
cp --target-directory="unsigned-app-${HOST}" \
contrib/macdeploy/detached-sig-create.sh
Expand Down
1 change: 1 addition & 0 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
-e 's|@STRIP@|$(host_STRIP)|' \
-e 's|@OBJCOPY@|$(host_OBJCOPY)|' \
-e 's|@OBJDUMP@|$(host_OBJDUMP)|' \
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS))|' \
-e 's|@CFLAGS_RELEASE@|$(strip $(host_release_CFLAGS))|' \
-e 's|@CFLAGS_DEBUG@|$(strip $(host_debug_CFLAGS))|' \
Expand Down
3 changes: 3 additions & 0 deletions depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ ifneq ($(host),$(build))
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name)
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
ifneq ($(findstring darwin,$(host)),)
$(1)_cmake += -DCMAKE_INSTALL_NAME_TOOL=`which llvm-install-name-tool`
endif
endif
endif
endef
Expand Down
2 changes: 2 additions & 0 deletions depends/hosts/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ darwin_cmake_system_name=Darwin
# Darwin version, which corresponds to OSX_MIN_VERSION.
# See https://en.wikipedia.org/wiki/Darwin_(operating_system)
darwin_cmake_system_version=20.1

darwin_INSTALL_NAME_TOOL=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-install-name-tool")
3 changes: 2 additions & 1 deletion depends/hosts/default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ default_host_STRIP = $(host_toolchain)strip
default_host_NM = $(host_toolchain)nm
default_host_OBJCOPY = $(host_toolchain)objcopy
default_host_OBJDUMP = $(host_toolchain)objdump
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool

define add_host_tool_func
ifneq ($(filter $(origin $1),undefined default),)
Expand Down Expand Up @@ -39,5 +40,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1)
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
endef

$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OBJDUMP DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OBJDUMP DSYMUTIL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
4 changes: 4 additions & 0 deletions depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ set(CMAKE_STRIP "@STRIP@")
set(CMAKE_OBJCOPY "@OBJCOPY@")
set(CMAKE_OBJDUMP "@OBJDUMP@")

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CMAKE_INSTALL_NAME_TOOL "@INSTALL_NAME_TOOL@")
endif()

# Using our own built dependencies should not be
# affected by a potentially random environment.
set(CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH OFF)
Expand Down
2 changes: 1 addition & 1 deletion share/qt/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</array>

<key>CFBundleIconFile</key>
<string>bitcoin.icns</string>
<string>namecoin.icns</string>

<key>CFBundlePackageType</key>
<string>APPL</string>
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ if(BUILD_BITCOIN_BIN)
add_windows_resources(namecoin bitcoin-res.rc)
add_windows_application_manifest(namecoin)
target_link_libraries(namecoin core_interface bitcoin_common bitcoin_util)
install_binary_component(namecoin HAS_MANPAGE)
install_binary_component(namecoin)
endif()

# Bitcoin Core bitcoind.
Expand Down
2 changes: 1 addition & 1 deletion src/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ if(ENABLE_IPC)
bitcoin_node
bitcoin_ipc
)
import_plugins(bitcoin-gui)
import_plugins(namecoin-gui)
install_binary_component(namecoin-gui INTERNAL)
if(WIN32)
set_target_properties(namecoin-gui PROPERTIES WIN32_EXECUTABLE TRUE)
Expand Down
2 changes: 1 addition & 1 deletion src/qt/forms/debugwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<property name="toolTip">
<string>Network addresses that your Bitcoin node is currently using to communicate with other nodes.</string>
<string>Network addresses that your Namecoin node is currently using to communicate with other nodes.</string>
</property>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions src/qt/forms/optionsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
<item>
<widget class="QCheckBox" name="mapPortNatpmp">
<property name="toolTip">
<string>Automatically open the Bitcoin client port on the router. This only works when your router supports PCP or NAT-PMP and it is enabled. The external port could be random.</string>
<string>Automatically open the Namecoin client port on the router. This only works when your router supports PCP or NAT-PMP and it is enabled. The external port could be random.</string>
</property>
<property name="text">
<string>Map port using PCP or NA&amp;T-PMP</string>
Expand Down Expand Up @@ -525,7 +525,7 @@
<item>
<widget class="QCheckBox" name="connectSocksTor">
<property name="toolTip">
<string>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor onion services.</string>
<string>Connect to the Namecoin network through a separate SOCKS5 proxy for Tor onion services.</string>
</property>
<property name="text">
<string>Use separate SOCKS&amp;5 proxy to reach peers via Tor onion services:</string>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/forms/receivecoinsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<item row="6" column="0">
<widget class="QLabel" name="label_3">
<property name="toolTip">
<string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
<string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Namecoin network.</string>
</property>
<property name="text">
<string>&amp;Message:</string>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/macnotificationhandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation NSBundle(returnCorrectIdentifier)
- (NSString *)__bundleIdentifier
{
if (self == [NSBundle mainBundle]) {
return @"org.bitcoinfoundation.Bitcoin-Qt";
return @"org.namecoin.Namecoin-Qt";
} else {
return [self __bundleIdentifier];
}
Expand Down
Binary file added src/qt/res/icons/namecoin.icns
Binary file not shown.