mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-11 05:14:34 +00:00
Merge pull request #1047
158d50e
Teach build.sh to find qmake on systems where it's called qmake-qt5.
This commit is contained in:
commit
5268199679
1 changed files with 23 additions and 3 deletions
26
build.sh
26
build.sh
|
@ -8,6 +8,22 @@ if [ -z $BUILD_TYPE ]; then
|
||||||
BUILD_TYPE=release
|
BUILD_TYPE=release
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Return 0 if the command exists, 1 if it does not.
|
||||||
|
exists() {
|
||||||
|
command -v "$1" &>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Return the first value in $@ that's a runnable command.
|
||||||
|
find_command() {
|
||||||
|
for arg in "$@"; do
|
||||||
|
if exists "$arg"; then
|
||||||
|
echo "$arg"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" == "release" ]; then
|
if [ "$BUILD_TYPE" == "release" ]; then
|
||||||
echo "Building release"
|
echo "Building release"
|
||||||
CONFIG="CONFIG+=release";
|
CONFIG="CONFIG+=release";
|
||||||
|
@ -64,8 +80,8 @@ if [ ! -d build ]; then mkdir build; fi
|
||||||
|
|
||||||
# Platform indepenent settings
|
# Platform indepenent settings
|
||||||
if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then
|
if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then
|
||||||
distro=$(lsb_release -is)
|
exists lsb_release && distro="$(lsb_release -is)"
|
||||||
if [ "$distro" == "Ubuntu" ]; then
|
if [ "$distro" = "Ubuntu" ] || [ "$distro" = "Fedora" ] || test -f /etc/fedora-release; then
|
||||||
CONFIG="$CONFIG libunwind_off"
|
CONFIG="$CONFIG libunwind_off"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -85,7 +101,11 @@ popd
|
||||||
echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js
|
echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
qmake ../monero-wallet-gui.pro "$CONFIG" || exit
|
if ! QMAKE=$(find_command qmake qmake-qt5); then
|
||||||
|
echo "Failed to find suitable qmake command."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
$QMAKE ../monero-wallet-gui.pro "$CONFIG" || exit
|
||||||
$MAKE || exit
|
$MAKE || exit
|
||||||
|
|
||||||
# Copy monerod to bin folder
|
# Copy monerod to bin folder
|
||||||
|
|
Loading…
Reference in a new issue