From 8a55213b8a6d9661858d4f4e9cd5c3e41f3075f5 Mon Sep 17 00:00:00 2001 From: EDDragonWolf Date: Wed, 14 Mar 2018 09:00:21 -0700 Subject: [PATCH] Disable not important modules for libwallet --- CMakeLists.txt | 6 +- src/CMakeLists.txt | 6 +- src/supernode/CMakeLists.txt | 210 ++++++++++++----------- utils/build_scripts/android32.Dockerfile | 4 +- utils/build_scripts/android64.Dockerfile | 4 +- 5 files changed, 116 insertions(+), 114 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbcc308a3..9f99fb923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -705,9 +705,9 @@ treat_warnings_as_errors(contrib src) option(BUILD_TESTS "Build tests." OFF) -if(BUILD_TESTS) - add_subdirectory(tests) -endif() +#if(BUILD_TESTS) +# add_subdirectory(tests) +#endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8c3d0b0aa..75f0eca68 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -117,9 +117,9 @@ if(NOT IOS) endif() add_subdirectory(cryptonote_protocol) if(NOT IOS) - add_subdirectory(simplewallet) - add_subdirectory(daemonizer) - add_subdirectory(daemon) +# add_subdirectory(simplewallet) +# add_subdirectory(daemonizer) +# add_subdirectory(daemon) add_subdirectory(blockchain_utilities) endif() diff --git a/src/supernode/CMakeLists.txt b/src/supernode/CMakeLists.txt index faecca12a..25214fd3e 100644 --- a/src/supernode/CMakeLists.txt +++ b/src/supernode/CMakeLists.txt @@ -37,28 +37,29 @@ set(supernode_sources graft_wallet.cpp wallet_args.cpp node_rpc_proxy.cpp - AuthSample.cpp - AuthSampleObject.cpp - BaseRTAObject.cpp - BaseRTAProcessor.cpp - baseclientproxy.cpp - DAPI_RPC_Client.cpp - DAPI_RPC_Server.cpp - FSN_Servant.cpp - PosProxy.cpp - PosSaleObject.cpp - SubNetBroadcast.cpp - WalletPayObject.cpp - WalletProxy.cpp - P2P_Broadcast.cpp - supernode_common_struct.cpp - supernode_rpc_command.cpp - FSN_ServantBase.cpp +# AuthSample.cpp +# AuthSampleObject.cpp +# BaseRTAObject.cpp +# BaseRTAProcessor.cpp +# baseclientproxy.cpp +# DAPI_RPC_Client.cpp +# DAPI_RPC_Server.cpp +# FSN_Servant.cpp +# PosProxy.cpp +# PosSaleObject.cpp +# SubNetBroadcast.cpp +# WalletPayObject.cpp +# WalletProxy.cpp +# P2P_Broadcast.cpp +# supernode_common_struct.cpp +# supernode_rpc_command.cpp +# FSN_ServantBase.cpp grafttxextra.cpp - TxPool.cpp - supernode_helpers.cpp - FSN_ActualList.cpp - WorkerPool.cpp) +# TxPool.cpp +# supernode_helpers.cpp +# FSN_ActualList.cpp +# WorkerPool.cpp + ) set(supernode_api_headers) @@ -69,24 +70,25 @@ set(supernode_private_headers wallet_args.h wallet_errors.h node_rpc_proxy.h - AuthSample.h - AuthSampleObject.h - BaseRTAObject.h - BaseRTAProcessor.h - baseclientproxy.h - DAPI_RPC_Client.h - DAPI_RPC_Server.h - FSN_Servant.h - PosProxy.h - PosSaleObject.h - SubNetBroadcast.h - WalletPayObject.h - WalletProxy.h - P2P_Broadcast.h - supernode_common_struct.h - supernode_rpc_command.h - TxPool.h - WorkerPool.h) +# AuthSample.h +# AuthSampleObject.h +# BaseRTAObject.h +# BaseRTAProcessor.h +# baseclientproxy.h +# DAPI_RPC_Client.h +# DAPI_RPC_Server.h +# FSN_Servant.h +# PosProxy.h +# PosSaleObject.h +# SubNetBroadcast.h +# WalletPayObject.h +# WalletProxy.h +# P2P_Broadcast.h +# supernode_common_struct.h +# supernode_rpc_command.h +# TxPool.h +# WorkerPool.h + ) monero_private_headers(supernode ${supernode_private_headers}) @@ -97,12 +99,12 @@ monero_add_library(supernode target_link_libraries(supernode PUBLIC - rpc +# rpc common cryptonote_core mnemonics - p2p - blockchain_db +# p2p +# blockchain_db cncrypto cryptonote_protocol ${Boost_CHRONO_LIBRARY} @@ -115,65 +117,65 @@ target_link_libraries(supernode ${EXTRA_LIBRARIES}) add_dependencies(supernode version) -if (NOT BUILD_GUI_DEPS) - set(supernode_rpc_sources - main.cpp - ) - - set(supernode_rpc_headers) - - set(supernode_rpc_private_headers) - - monero_private_headers(supernode_rpc_server - ${supernode_rpc_private_headers}) - monero_add_executable(supernode_rpc_server - ${supernode_rpc_sources} - ${supernode_rpc_headers} - ${supernode_rpc_private_headers}) - - target_link_libraries(supernode_rpc_server - PRIVATE - supernode - wallet - epee - rpc - cryptonote_core - cryptonote_protocol - cncrypto - common - mnemonics - p2p - blockchain_db - ${Boost_CHRONO_LIBRARY} - ${Boost_PROGRAM_OPTIONS_LIBRARY} - ${Boost_FILESYSTEM_LIBRARY} - ${Boost_THREAD_LIBRARY} - ${CMAKE_THREAD_LIBS_INIT} - ${EXTRA_LIBRARIES}) - add_dependencies(supernode_rpc_server version) - set_property(TARGET supernode_rpc_server - PROPERTY - OUTPUT_NAME "graft-supernode") - install(TARGETS supernode_rpc_server DESTINATION bin) -endif() - - -# build and install libsupernode_merged only if we building for GUI -if (BUILD_GUI_DEPS) - set(libs_to_merge supernode cryptonote_core cryptonote_basic mnemonics common cncrypto ringct) - - foreach(lib ${libs_to_merge}) - list(APPEND objlibs $) # matches naming convention in src/CMakeLists.txt - endforeach() - add_library(supernode_merged STATIC ${objlibs}) - if(IOS) - set(lib_folder lib-${ARCH}) - else() - set(lib_folder lib) - endif() - install(TARGETS supernode_merged - ARCHIVE DESTINATION ${lib_folder}) - - install(FILES ${supernode_api_headers} - DESTINATION include/supernode) -endif() +#if (NOT BUILD_GUI_DEPS) +# set(supernode_rpc_sources +# main.cpp +# ) + +# set(supernode_rpc_headers) + +# set(supernode_rpc_private_headers) + +# monero_private_headers(supernode_rpc_server +# ${supernode_rpc_private_headers}) +# monero_add_executable(supernode_rpc_server +# ${supernode_rpc_sources} +# ${supernode_rpc_headers} +# ${supernode_rpc_private_headers}) + +# target_link_libraries(supernode_rpc_server +# PRIVATE +# supernode +# wallet +# epee +# rpc +# cryptonote_core +# cryptonote_protocol +# cncrypto +# common +# mnemonics +# p2p +# blockchain_db +# ${Boost_CHRONO_LIBRARY} +# ${Boost_PROGRAM_OPTIONS_LIBRARY} +# ${Boost_FILESYSTEM_LIBRARY} +# ${Boost_THREAD_LIBRARY} +# ${CMAKE_THREAD_LIBS_INIT} +# ${EXTRA_LIBRARIES}) +# add_dependencies(supernode_rpc_server version) +# set_property(TARGET supernode_rpc_server +# PROPERTY +# OUTPUT_NAME "graft-supernode") +# install(TARGETS supernode_rpc_server DESTINATION bin) +#endif() + + +## build and install libsupernode_merged only if we building for GUI +#if (BUILD_GUI_DEPS) +# set(libs_to_merge supernode cryptonote_core cryptonote_basic mnemonics common cncrypto ringct) + +# foreach(lib ${libs_to_merge}) +# list(APPEND objlibs $) # matches naming convention in src/CMakeLists.txt +# endforeach() +# add_library(supernode_merged STATIC ${objlibs}) +# if(IOS) +# set(lib_folder lib-${ARCH}) +# else() +# set(lib_folder lib) +# endif() +# install(TARGETS supernode_merged +# ARCHIVE DESTINATION ${lib_folder}) + +# install(FILES ${supernode_api_headers} +# DESTINATION include/supernode) +#endif() diff --git a/utils/build_scripts/android32.Dockerfile b/utils/build_scripts/android32.Dockerfile index da81b6435..9402aaf49 100644 --- a/utils/build_scripts/android32.Dockerfile +++ b/utils/build_scripts/android32.Dockerfile @@ -72,8 +72,8 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make build_crypto build_ssl \ && cd .. && mv openssl-${OPENSSL_VERSION} openssl -RUN git clone https://github.com/monero-project/monero.git \ - && cd monero \ +RUN git clone https://github.com/EDDragonWolf/GraftNetwork.git \ + && cd GraftNetwork \ && mkdir -p build/release \ && CC=clang CXX=clang++ \ BOOST_ROOT=${WORKDIR}/boost_${BOOST_VERSION} BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ \ diff --git a/utils/build_scripts/android64.Dockerfile b/utils/build_scripts/android64.Dockerfile index c19127e4d..117281f80 100644 --- a/utils/build_scripts/android64.Dockerfile +++ b/utils/build_scripts/android64.Dockerfile @@ -72,7 +72,7 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make build_crypto build_ssl \ && cd .. && mv openssl-${OPENSSL_VERSION} openssl -RUN git clone --single-branch --depth=1 https://github.com/graft-project/GraftNetwork.git \ +RUN git clone --single-branch --depth=1 https://github.com/EDDragonWolf/GraftNetwork.git \ && cd GraftNetwork \ && mkdir -p build/release \ && cd build/release \ @@ -80,4 +80,4 @@ RUN git clone --single-branch --depth=1 https://github.com/graft-project/GraftNe BOOST_ROOT=${WORKDIR}/boost_${BOOST_VERSION} BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android64/lib/ \ OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android" ../.. \ - && make -j3 + && make release-static-android -j3