build: adjusted with bitmonero->monero renamings;

build: temporary disabled link with 'libunwind' due Ubuntu issues
This commit is contained in:
Ilya Kitaev 2016-09-19 16:45:34 +03:00
parent 6e5f5e1ded
commit 3cc318eb5d
3 changed files with 31 additions and 26 deletions

View file

@ -2,9 +2,9 @@
pushd $(pwd) pushd $(pwd)
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BITMOMERO_DIR=bitmonero MONERO_DIR=monero
if [ ! -d $BITMOMERO_DIR ]; then if [ ! -d $MONERO_DIR ]; then
$SHELL get_libwallet_api.sh $SHELL get_libwallet_api.sh
fi fi

View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
BITMONERO_URL=https://github.com/monero-project/bitmonero.git MONERO_URL=https://github.com/monero-project/monero.git
BITMONERO_BRANCH=master MONERO_BRANCH=master
# thanks to SO: http://stackoverflow.com/a/20283965/4118915 # thanks to SO: http://stackoverflow.com/a/20283965/4118915
CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
pushd $(pwd) pushd $(pwd)
@ -10,51 +10,55 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
INSTALL_DIR=$ROOT_DIR/wallet INSTALL_DIR=$ROOT_DIR/wallet
BITMONERO_DIR=$ROOT_DIR/bitmonero MONERO_DIR=$ROOT_DIR/monero
if [ ! -d $BITMONERO_DIR ]; then if [ ! -d $MONERO_DIR ]; then
git clone --depth=1 $BITMONERO_URL $BITMONERO_DIR --branch $BITMONERO_BRANCH --single-branch git clone --depth=1 $MONERO_URL $MONERO_DIR --branch $MONERO_BRANCH --single-branch
else else
cd $BITMONERO_DIR; cd $MONERO_DIR;
git checkout $BITMONERO_BRANCH git checkout $MONERO_BRANCH
git pull; git pull;
fi fi
echo "cleaning up existing bitmonero build dir, libs and includes" echo "cleaning up existing monero build dir, libs and includes"
rm -fr $BITMONERO_DIR/build rm -fr $MONERO_DIR/build
rm -fr $BITMONERO_DIR/lib rm -fr $MONERO_DIR/lib
rm -fr $BITMONERO_DIR/include rm -fr $MONERO_DIR/include
mkdir -p $BITMONERO_DIR/build/release mkdir -p $MONERO_DIR/build/release
pushd $BITMONERO_DIR/build/release pushd $MONERO_DIR/build/release
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" == "Darwin" ]; then
# Do something under Mac OS X platform # Do something under Mac OS X platform
cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
# Do something under GNU/Linux platform # Do something under GNU/Linux platform
cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../.. PLATFORM="Linux"
cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
# Do something under Windows NT platform # Do something under Windows NT platform
cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" -G "MSYS Makefiles" ../.. cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../..
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
# Do something under Windows NT platform # Do something under Windows NT platform
cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" -G "MSYS Makefiles" ../.. cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../..
fi fi
pushd $BITMONERO_DIR/build/release/src/wallet pushd $MONERO_DIR/build/release/src/wallet
make -j$CPU_CORE_COUNT make -j$CPU_CORE_COUNT
make install -j$CPU_CORE_COUNT make install -j$CPU_CORE_COUNT
popd popd
# unbound is one more dependency. can't be merged to the wallet_merged # unbound is one more dependency. can't be merged to the wallet_merged
# since filename conflict (random.c.obj) # since filename conflict (random.c.obj)
pushd $BITMONERO_DIR/build/release/external/unbound # for Linux, we use libunbound from repository, so we don't need to build it
make -j$CPU_CORE_COUNT if [ $PLATFORM != "Linux" ]; then
make install -j$CPU_CORE_COUNT pushd $MONERO_DIR/build/release/external/unbound
popd make -j$CPU_CORE_COUNT
make install -j$CPU_CORE_COUNT
popd
fi
popd popd

View file

@ -2,7 +2,7 @@ TEMPLATE = app
QT += qml quick widgets QT += qml quick widgets
WALLET_ROOT=$$PWD/bitmonero WALLET_ROOT=$$PWD/monero
CONFIG += c++11 CONFIG += c++11
@ -86,7 +86,8 @@ linux {
-lssl \ -lssl \
-lcrypto \ -lcrypto \
-Wl,-Bdynamic \ -Wl,-Bdynamic \
-lunwind \ # currently monero has an issue with "static" build and linunwind-dev
# -lunwind \
-ldl -ldl
} }