1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-23 02:52:58 +01:00

Merge pull request #23

778695b build: clarified comment (Ilya Kitaev)
740669a build: Building vendored libunbound for mingw builds (Ilya Kitaev)
9ec8eb9 build: Build vendored libunbound for MacOS X (Ilya Kitaev)
3cc318e build: adjusted with bitmonero->monero renamings; build: temporary disabled link with 'libunwind' due Ubuntu issues (Ilya Kitaev)
This commit is contained in:
Riccardo Spagni 2016-10-04 12:25:04 +02:00
commit b3c9ba0868
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
3 changed files with 33 additions and 26 deletions

View File

@ -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

View File

@ -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,57 @@ 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 INSTALL_VENDORED_LIBUNBOUND=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 INSTALL_VENDORED_LIBUNBOUND=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 INSTALL_VENDORED_LIBUNBOUND=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 shipped with the system, so we don't need to build it
if [ "$PLATFORM" != "Linux" ]; then
echo "Building libunbound..."
pushd $MONERO_DIR/build/release/external/unbound
make -j$CPU_CORE_COUNT
make install -j$CPU_CORE_COUNT
popd
fi
popd

View File

@ -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
}