Created
July 14, 2019 09:26
-
-
Save bellflower2015/ab4973e55bd65a47c101e2f70588ab28 to your computer and use it in GitHub Desktop.
sandego-qt-win.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get -y update | |
sudo apt-get -y install build-essential libtool automake pkg-config mingw-w64 | |
sudo update-alternatives --set i686-w64-mingw32-gcc \ | |
$(update-alternatives --list i686-w64-mingw32-gcc | grep -- -posix) | |
sudo update-alternatives --set i686-w64-mingw32-g++ \ | |
$(update-alternatives --list i686-w64-mingw32-g++ | grep -- -posix) | |
sudo update-alternatives --set x86_64-w64-mingw32-gcc \ | |
$(update-alternatives --list x86_64-w64-mingw32-gcc | grep -- -posix) | |
sudo update-alternatives --set x86_64-w64-mingw32-g++ \ | |
$(update-alternatives --list x86_64-w64-mingw32-g++ | grep -- -posix) | |
TMP_DIRNAME=$(mktemp -d sdgo.XXXXXX) | |
BUILD_DIR=$PWD/$TMP_DIRNAME | |
mkdir -p $BUILD_DIR | |
curl -fsSL https://gist.githubusercontent.com/bellflower2015/3291d1a7ac04b53931593021a8b103cb/raw/SanDeGo-depends.patch > $BUILD_DIR/SanDeGo-depends.patch | |
curl -fsSL https://gist.githubusercontent.com/bellflower2015/bbda88d38b10025b24e22e251b5691c5/raw/SanDeGo-qt.pro.patch > $BUILD_DIR/SanDeGo-qt.pro.patch | |
cd $BUILD_DIR | |
git clone -b v0.17.1 --depth 1 https://github.com/bitcoin/bitcoin.git | |
cd bitcoin | |
patch -p1 < $BUILD_DIR/SanDeGo-depends.patch | |
cd depends | |
make HOST=x86_64-w64-mingw32 -j$(nproc) | |
cd $BUILD_DIR | |
git clone https://github.com/SanDeGoProject/SanDeGo.git | |
cd SanDeGo | |
patch -p1 < $BUILD_DIR/SanDeGo-qt.pro.patch | |
DEPENDS=$BUILD_DIR/bitcoin/depends/x86_64-w64-mingw32 | |
$DEPENDS/native/bin/qmake \ | |
BOOST_LIB_SUFFIX=-mt-s \ | |
BOOST_THREAD_LIB_SUFFIX=-mt-s \ | |
BOOST_INCLUDE_PATH=$DEPENDS/include/boost \ | |
BOOST_LIB_PATH=$DEPENDS/lib \ | |
OPENSSL_INCLUDE_PATH=$DEPENDS/include/openssl \ | |
OPENSSL_LIB_PATH=$DEPENDS/lib \ | |
BDB_INCLUDE_PATH=$DEPENDS/include \ | |
BDB_LIB_PATH=$DEPENDS/lib \ | |
MINIUPNPC_INCLUDE_PATH=$DEPENDS/include \ | |
MINIUPNPC_LIB_PATH=$DEPENDS/lib \ | |
QMAKE_LRELEASE=$DEPENDS/native/bin/lrelease | |
make -j$(nproc) -f Makefile.Release | |
if [ -d /vagrant ]; then | |
cp release/sandego-qt.exe /vagrant/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment