diff --git a/win-build-sdx.sh b/win-build-sdx.sh new file mode 100755 index 0000000..d6eadd5 --- /dev/null +++ b/win-build-sdx.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2018-2023 The Hush Developers +# Released under the GPLv3 + +# This builds a binary called "silentdragonx" + +set -e + +# TODO: not ideal, hushd.exe should only be looked for on windoze +if [ -e "dragonxd" ]; then + echo "Found dragonxd binary" +elif [ -e "hushd.exe" ]; then + echo "Found hushd.exe binary" +else + echo "dragonxd could not be found!" + echo "Either copy the binary to this dir or make a symlink." + echo "This command will create a symlink to it if this repo is in the same directory as your hush3.git: " + echo "ln -s ../hush3/src/dragonxd" + echo "For windoze you should copy hushd.exe to this directory" + exit 1 +fi + +# Use a modified QT project file with same build.sh +SDCONF=silentdragonx.pro ./win-build.sh $@ diff --git a/win-build.sh b/win-build.sh index e3fbe01..120ea43 100755 --- a/win-build.sh +++ b/win-build.sh @@ -6,19 +6,35 @@ set -e UNAME=$(uname) -if [ "$UNAME" == "Linux" ] ; then - JOBS=$(nproc) -elif [ "$UNAME" == "FreeBSD" ] ; then - JOBS=$(nproc) -elif [ "$UNAME" == "Darwin" ] ; then - JOBS=$(sysctl -n hw.ncpu) -else +#if [ "$UNAME" == "Linux" ] ; then +# JOBS=$(nproc) +#elif [ "$UNAME" == "FreeBSD" ] ; then +# JOBS=$(nproc) +#elif [ "$UNAME" == "Darwin" ] ; then +# JOBS=$(sysctl -n hw.ncpu) +#else JOBS=1 -fi +#fi VERSION=$(cat src/version.h |cut -d\" -f2) -echo "Compiling SilentDragon $VERSION with $JOBS threads..." -CONF=silentdragon.pro +CONF=${SDCONF:-silentdragon.pro} +WALLET="SilentDragon" +if [ "$CONF" == "silentdragonx.pro" ] ; then + WALLET="SilentDragonX" +fi +echo "Compiling $WALLET $VERSION with $JOBS threads..." + +if ! command -v qmake &> /dev/null +then + echo "qmake could not be found. Please install QT and try again." + exit 1 +fi + +if ! command -v make &> /dev/null +then + echo "make could not be found. Please install it and try again." + exit 1 +fi qbuild () { x86_64-w64-mingw32.static-qmake-qt5 $CONF CONFIG+=debug