-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure
executable file
·54 lines (43 loc) · 1.35 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -e
set -o xtrace
PROJECT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd . > /dev/null
cd "$PROJECT_PATH"
git submodule update --init --recursive
build_qbs=true
if qbs_loc="$(type -p "qbs")" || [ -z "$qbs_loc" ]; then
version="$(qbs --version)"
echo "found qbs version: $version"
a=( ${version//./ } )
major=${a[0]}
minor=${a[1]}
echo "qbs major: $major and minor: $minor"
if [ "$major" -ge "1" ] && [ "$minor" -ge "6" ]; then
build_qbs=false
fi
fi
if $build_qbs; then
echo "build qbs..."
mkdir -p "$PROJECT_PATH/build/tools/qbs"
cd "$PROJECT_PATH/build/tools/qbs"
qmake -r "$PROJECT_PATH/tools/qbs/qbs.pro"
make
fi
if [[ "$OSTYPE" == "linux-gnu" ]]; then
BIN_PATH="$PROJECT_PATH/build/tools/"
mkdir -p "$BIN_PATH"
if [ ! -f "$BIN_PATH/linuxdeployqt" ] ; then
cd "$BIN_PATH"
wget "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
mv "linuxdeployqt-continuous-x86_64.AppImage" "linuxdeployqt"
chmod +x "linuxdeployqt"
fi
if [ ! -f "$BIN_PATH/appimagetool" ] ; then
cd "$BIN_PATH"
wget "https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
mv "appimagetool-x86_64.AppImage" "appimagetool"
chmod +x "appimagetool"
fi
fi
popd > /dev/null