forked from lthn/blockchain
Merge remote-tracking branch 'origin/develop' into cryptoassets
# Conflicts: # README.md # src/gui/qt-daemon/layout # src/version.h.in
This commit is contained in:
commit
fcefdd8eb5
8 changed files with 65 additions and 43 deletions
|
|
@ -194,8 +194,8 @@ else()
|
|||
endif()
|
||||
|
||||
|
||||
# If BOOST_ROOT is set, ignore system-wide Boost
|
||||
if(DEFINED ENV{BOOST_ROOT})
|
||||
# always use system-wide Boost (unless ZANO_USE_SYSTEM_BOOST is defined for some reason, which is not recommended)
|
||||
if(NOT DEFINED ENV{ZANO_USE_SYSTEM_BOOST})
|
||||
set(Boost_NO_SYSTEM_PATHS ON)
|
||||
endif()
|
||||
|
||||
|
|
@ -221,8 +221,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(Boost_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}/${CMAKE_ANDROID_ARCH_ABI}/")
|
||||
set(Boost_LIBRARIES "${Boost_LIBRARY_DIRS}libboost_system.a;${Boost_LIBRARY_DIRS}libboost_filesystem.a;${Boost_LIBRARY_DIRS}libboost_thread.a;${Boost_LIBRARY_DIRS}libboost_timer.a;${Boost_LIBRARY_DIRS}libboost_date_time.a;${Boost_LIBRARY_DIRS}libboost_chrono.a;${Boost_LIBRARY_DIRS}libboost_regex.a;${Boost_LIBRARY_DIRS}libboost_serialization.a;${Boost_LIBRARY_DIRS}libboost_atomic.a;${Boost_LIBRARY_DIRS}libboost_program_options.a")
|
||||
elseif(APPLE)
|
||||
find_package(Boost 1.71 EXACT REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale)
|
||||
else()
|
||||
find_package(Boost 1.70 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale)
|
||||
find_package(Boost 1.70 EXACT REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale)
|
||||
endif()
|
||||
|
||||
|
||||
|
|
|
|||
53
README.md
53
README.md
|
|
@ -42,18 +42,25 @@ Recommended OS versions: Ubuntu 20.04, 22.04 LTS.
|
|||
|
||||
sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev mesa-common-dev libglu1-mesa-dev
|
||||
|
||||
2. Download and build Boost\
|
||||
(Assuming you have cloned Zano into the 'zano' folder. If you used a different location for Zano, edit line 4 accordingly.)
|
||||
2. Clone Zano into a local folder\
|
||||
(If for some reason you need to use alternative Zano branch, change 'master' to the required branch name.)
|
||||
|
||||
git clone --recursive https://github.com/hyle-team/zano.git -b master
|
||||
|
||||
In the following steps we assume that you cloned Zano into '~/zano' folder in your home directory.
|
||||
|
||||
3. Download and build Boost\
|
||||
(Assuming you have cloned Zano into the 'zano' folder. If you used a different location for Zano, **edit line 4** accordingly.)
|
||||
|
||||
curl -OL https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2
|
||||
echo "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 boost_1_70_0.tar.bz2" | shasum -c && tar -xjf boost_1_70_0.tar.bz2
|
||||
rm boost_1_70_0.tar.bz2 && cd boost_1_70_0
|
||||
patch -p0 < ../zano/utils/boost_1.70_gcc_8.patch || cd ..
|
||||
./bootstrap.sh --with-libraries=system,filesystem,thread,date_time,chrono,regex,serialization,atomic,program_options,locale,timer,log
|
||||
./b2
|
||||
./b2 && cd ..
|
||||
Make sure that you see "The Boost C++ Libraries were successfully built!" message at the end.
|
||||
|
||||
3. Install Qt\
|
||||
4. Install Qt\
|
||||
(*GUI version only, skip this step if you're building server version*)
|
||||
|
||||
[*GUI version*]
|
||||
|
|
@ -64,18 +71,19 @@ Recommended OS versions: Ubuntu 20.04, 22.04 LTS.
|
|||
Then follow the instructions in Wizard. Don't forget to tick the WebEngine module checkbox!
|
||||
|
||||
|
||||
4. Install OpenSSL
|
||||
5. Install OpenSSL
|
||||
|
||||
We recommend installing OpenSSL v1.1.1w locally unless you would like to use the same version system-wide. Adjust the local path `/home/user/openssl` in the commands below according to your needs.
|
||||
We recommend installing OpenSSL v1.1.1w locally unless you would like to use the same version system-wide.\
|
||||
(Assuming that `$HOME` environment variable is set to your home directory. Otherwise, edit line 4 accordingly.)
|
||||
|
||||
curl -OL https://www.openssl.org/source/openssl-1.1.1w.tar.gz
|
||||
echo "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 openssl-1.1.1w.tar.gz" | shasum -c && tar xaf openssl-1.1.1w.tar.gz
|
||||
cd openssl-1.1.1w/
|
||||
./config --prefix=/home/user/openssl --openssldir=/home/user/openssl shared zlib
|
||||
make && make test && make install
|
||||
./config --prefix=$HOME/openssl --openssldir=$HOME/openssl shared zlib
|
||||
make && make test && make install && cd ..
|
||||
|
||||
|
||||
5. Set environment variables properly\
|
||||
6. [*OPTIONAL*] Set global environment variables for convenient use\
|
||||
For instance, by adding the following lines to `~/.bashrc`
|
||||
|
||||
[*server version*]
|
||||
|
|
@ -90,18 +98,27 @@ For instance, by adding the following lines to `~/.bashrc`
|
|||
export OPENSSL_ROOT_DIR=/home/user/openssl
|
||||
export QT_PREFIX_PATH=/home/user/Qt5.11.2/5.11.2/gcc_64
|
||||
|
||||
Make sure you've restarted your terminal session (by reopening the terminal window or reconnecting the server) to apply these changes.
|
||||
|
||||
6. Build the binaries
|
||||
1. Build daemon and simplewallet:
|
||||
|
||||
cd zano/ && make -j1
|
||||
or
|
||||
**NOTICE: Please edit the lines above according to your actual paths.**
|
||||
|
||||
**NOTICE 2:** Make sure you've restarted your terminal session (by reopening the terminal window or reconnecting the server) to apply these changes.
|
||||
|
||||
8. Build the binaries
|
||||
1. If you skipped step 6 and did not set the environment variables:
|
||||
|
||||
cd zano && mkdir build && cd build
|
||||
BOOST_ROOT=$HOME/boost_1_70_0 OPENSSL_ROOT_DIR=$HOME/openssl cmake ..
|
||||
make -j1 daemon simplewallet
|
||||
|
||||
2. If you set the variables in step 6:
|
||||
|
||||
cd zano && mkdir build && cd build
|
||||
cmake ..
|
||||
make -j1 daemon simplewallet
|
||||
|
||||
or simply:
|
||||
|
||||
cd zano && make -j1
|
||||
|
||||
**NOTICE**: If you are building on a machine with a relatively high amount of RAM or with the proper setting of virtual memory, then you can use `-j2` or `-j` option to speed up the building process. Use with caution.
|
||||
|
||||
**NOTICE 2**: If you'd like to build binaries for the testnet, use `cmake -D TESTNET=TRUE ..` instead of `cmake ..` .
|
||||
|
|
@ -111,12 +128,12 @@ For instance, by adding the following lines to `~/.bashrc`
|
|||
cd zano
|
||||
utils/build_script_linux.sh
|
||||
|
||||
7. Look for the binaries in `build` folder
|
||||
Look for the binaries in `build` folder
|
||||
|
||||
<br />
|
||||
|
||||
### Windows
|
||||
Recommended OS version: Windows 7 x64.
|
||||
Recommended OS version: Windows 7 x64, Windows 11 x64.
|
||||
1. Install required prerequisites (Boost, Qt, CMake, OpenSSL).
|
||||
2. Edit paths in `utils/configure_local_paths.cmd`.
|
||||
3. Run one of `utils/configure_win64_msvsNNNN_gui.cmd` according to your MSVC version.
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ namespace tools
|
|||
};
|
||||
|
||||
#ifndef TESTNET
|
||||
static constexpr pre_download_entry c_pre_download_mdbx = { "http://95.217.42.247/pre-download/zano_mdbx_95_2200000.pak", "c3bd64c62495c3f266759750952519f13f32fc161b59547beaa8202b6e26d516", 2628767033, 5100195840 };
|
||||
static constexpr pre_download_entry c_pre_download_lmdb = { "http://95.217.42.247/pre-download/zano_lmdb_95_2200000.pak", "fcbf0ab3b23836e1a51fa675e719900fb94110cfb74790b3323cebce7fb9f5bd", 3426025872, 4954472448 };
|
||||
static constexpr pre_download_entry c_pre_download_mdbx = { "http://95.217.42.247/pre-download/zano_mdbx_95_2390000.pak", "ffc8d2220a4d8b3fba51073a422cbb6139c60858469ea086623f9d16329eb5b4", 2767268964, 5368627200 };
|
||||
static constexpr pre_download_entry c_pre_download_lmdb = { "http://95.217.42.247/pre-download/zano_lmdb_95_2390000.pak", "7e58951bc523eb12e0ec07171bc67b3f96bad4d5454dd2da56f642a872e230d3", 3618283035, 5156397056 };
|
||||
#else
|
||||
static constexpr pre_download_entry c_pre_download_mdbx = { "", "", 0, 0 };
|
||||
static constexpr pre_download_entry c_pre_download_lmdb = { "", "", 0, 0 };
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ namespace currency
|
|||
ADD_CHECKPOINT(1161000, "96990d851b484e30190678756ba2a4d3a2f92b987e2470728ac1e38b2bf35908");
|
||||
ADD_CHECKPOINT(1480000, "5dd3381eec35e8b4eba4518bfd8eec682a4292761d92218fd59b9f0ffedad3fe");
|
||||
ADD_CHECKPOINT(2000000, "7b6698a8cc279aa78d6263f01fef186bd16f5b1ea263a7f4714abc1d506b9cb3");
|
||||
ADD_CHECKPOINT(2390000, "10797d34349d0ef1d1ab4b41ada6f8f2c2f86a7f7eebe44dd2ba06067cb47e0a");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ create_desktop_icon()
|
|||
echo GenericName=Zano | tee -a $target_file_name > /dev/null
|
||||
echo Comment=Privacy blockchain | tee -a $target_file_name > /dev/null
|
||||
echo Icon=${out_dir}/Zano.png | tee -a $target_file_name > /dev/null
|
||||
echo Exec=$APPIMAGE --deeplink-params=%u | tee -a $target_file_name > /dev/null
|
||||
echo Terminal=true | tee -a $target_file_name > /dev/null
|
||||
echo Exec=$APPIMAGE --deeplink-params=\\\"%u\\\" | tee -a $target_file_name > /dev/null
|
||||
echo Terminal=false | tee -a $target_file_name > /dev/null
|
||||
echo Type=Application | tee -a $target_file_name > /dev/null
|
||||
echo "Categories=Qt;Utility;" | tee -a $target_file_name > /dev/null
|
||||
echo "MimeType=x-scheme-handler/zano;" | tee -a $target_file_name > /dev/null
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ fi
|
|||
|
||||
# copy all necessary libs into the bundle in order to workaround El Capitan's SIP restrictions
|
||||
mkdir -p Zano.app/Contents/Frameworks/boost_libs
|
||||
cp -R "$ZANO_BOOST_LIBS_PATH/" Zano.app/Contents/Frameworks/boost_libs/
|
||||
cp -R $ZANO_BOOST_LIBS_PATH/*.dylib Zano.app/Contents/Frameworks/boost_libs/
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to cp workaround to MacOS"
|
||||
exit 1
|
||||
|
|
@ -84,8 +84,7 @@ source ../../../utils/macosx_fix_boost_libs_path.sh
|
|||
fix_boost_libs_in_binary @executable_path/../Frameworks/boost_libs Zano.app/Contents/MacOS/Zano
|
||||
fix_boost_libs_in_binary @executable_path/../Frameworks/boost_libs Zano.app/Contents/MacOS/simplewallet
|
||||
fix_boost_libs_in_binary @executable_path/../Frameworks/boost_libs Zano.app/Contents/MacOS/zanod
|
||||
fix_boost_libs_in_libs @executable_path/../Frameworks/boost_libs Zano.app/Contents/Frameworks/boost_libs
|
||||
|
||||
#fix_boost_libs_in_libs @executable_path/../Frameworks/boost_libs Zano.app/Contents/Frameworks/boost_libs
|
||||
|
||||
|
||||
"$ZANO_QT_PATH/clang_64/bin/macdeployqt" Zano.app
|
||||
|
|
@ -95,6 +94,8 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
|
||||
|
||||
rm -rf Zano.app/Contents/Frameworks/libboost*.dylib
|
||||
|
||||
|
||||
rsync -a ../../../src/gui/qt-daemon/layout/html Zano.app/Contents/MacOS --exclude less --exclude package.json --exclude gulpfile.js
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ rmdir build /s /q
|
|||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake %TESTNET_DEF% -D OPENSSL_ROOT_DIR="%OPENSSL_ROOT_DIR%" -D CMAKE_PREFIX_PATH="%QT_MSVC_PATH%" -D BUILD_GUI=TRUE -D STATIC=FALSE -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_ROOT%\lib64-msvc-14.1" -G "Visual Studio 16 2019" -A x64 -T host=x64 ..
|
||||
cmake %TESTNET_DEF% -D OPENSSL_ROOT_DIR="%OPENSSL_ROOT_DIR%" -D CMAKE_PREFIX_PATH="%QT_MSVC_PATH%" -D BUILD_GUI=TRUE -D STATIC=FALSE -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_ROOT%\lib64-msvc-14.2" -G "Visual Studio 16 2019" -A x64 -T host=x64 ..
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
goto error
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ set -e
|
|||
|
||||
function rel_path() # $1 - path to a target dir/file, $2 - base dir
|
||||
{
|
||||
python -c "import os.path; print os.path.relpath('$1', os.path.dirname('$2'))"
|
||||
python3 -c "import os.path; print(os.path.relpath('$1', os.path.dirname('$2')))"
|
||||
}
|
||||
|
||||
function abs_path()
|
||||
{
|
||||
python -c "import os.path; print os.path.abspath('$1')"
|
||||
python3 -c "import os.path; print(os.path.abspath('$1'))"
|
||||
}
|
||||
|
||||
function fix_boost_libs_in_binary() # $1 - path to boost libs, $2 - binary to fix
|
||||
|
|
@ -17,23 +17,24 @@ function fix_boost_libs_in_binary() # $1 - path to boost libs, $2 - binary to fi
|
|||
echo "fix_boost_libs_in_binary is called with no or invalid parameters"
|
||||
return 1
|
||||
fi
|
||||
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2
|
||||
install_name_tool -change libboost_filesystem.dylib $1/libboost_filesystem.dylib $2
|
||||
install_name_tool -change libboost_thread.dylib $1/libboost_thread.dylib $2
|
||||
install_name_tool -change libboost_date_time.dylib $1/libboost_date_time.dylib $2
|
||||
install_name_tool -change libboost_chrono.dylib $1/libboost_chrono.dylib $2
|
||||
install_name_tool -change libboost_regex.dylib $1/libboost_regex.dylib $2
|
||||
install_name_tool -change libboost_serialization.dylib $1/libboost_serialization.dylib $2
|
||||
install_name_tool -change libboost_atomic.dylib $1/libboost_atomic.dylib $2
|
||||
install_name_tool -change libboost_program_options.dylib $1/libboost_program_options.dylib $2
|
||||
install_name_tool -change libboost_locale.dylib $1/libboost_locale.dylib $2
|
||||
install_name_tool -change libboost_timer.dylib $1/libboost_timer.dylib $2
|
||||
install_name_tool -change libboost_chrono.dylib $1/libboost_chrono.dylib $2
|
||||
install_name_tool -change @rpath/libboost_system.dylib $1/libboost_system.dylib $2
|
||||
install_name_tool -change @rpath/libboost_filesystem.dylib $1/libboost_filesystem.dylib $2
|
||||
install_name_tool -change @rpath/libboost_thread.dylib $1/libboost_thread.dylib $2
|
||||
install_name_tool -change @rpath/libboost_date_time.dylib $1/libboost_date_time.dylib $2
|
||||
install_name_tool -change @rpath/libboost_chrono.dylib $1/libboost_chrono.dylib $2
|
||||
install_name_tool -change @rpath/libboost_regex.dylib $1/libboost_regex.dylib $2
|
||||
install_name_tool -change @rpath/libboost_serialization.dylib $1/libboost_serialization.dylib $2
|
||||
install_name_tool -change @rpath/libboost_atomic.dylib $1/libboost_atomic.dylib $2
|
||||
install_name_tool -change @rpath/libboost_program_options.dylib $1/libboost_program_options.dylib $2
|
||||
install_name_tool -change @rpath/libboost_locale.dylib $1/libboost_locale.dylib $2
|
||||
install_name_tool -change @rpath/libboost_timer.dylib $1/libboost_timer.dylib $2
|
||||
install_name_tool -change @rpath/libboost_chrono.dylib $1/libboost_chrono.dylib $2
|
||||
return 0
|
||||
}
|
||||
|
||||
function fix_boost_libs_in_libs() # $1 - path to boost libs, $2 - path to libs folder
|
||||
{
|
||||
return 0 # temporary disabled -- 2023-11-20, sowle
|
||||
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2/libboost_filesystem.dylib
|
||||
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2/libboost_thread.dylib
|
||||
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2/libboost_chrono.dylib
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue