build: adjusted with bitmonero->monero renamings;

build: temporary disabled link with 'libunwind' due Ubuntu issues
pull/2/head
Ilya Kitaev 8 years ago
parent 6e5f5e1ded
commit 3cc318eb5d

@ -2,9 +2,9 @@
pushd $(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
fi

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

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