-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfigure
executable file
·53 lines (43 loc) · 1.55 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
#!/bin/sh
# Change this to your Qt binaries directory.
QTBIN_PATH=""
# Change this to your python3.x-config binary. It is recommended to use absolute path
# to avoid ambiquity when multiple Python versions are installed.
#PYTHON_CONFIG=python3-config
echo "Configuring Kactus2..."
echo ""
#echo "Locating python3-config..."
#if ! command -v $PYTHON_CONFIG >/dev/null 2>&1;
#then
# echo "$PYTHON_CONFIG could not be found. Please set variable PYTHON_CONFIG."
# exit
#fi
#export PYTHON_CONFIG=$PYTHON_CONFIG
print_success() {
if [ -f "Makefile" ];
then
echo ""
echo "Kactus2 has now been configured. Run make to start the build."
echo "To install, run make install after the build has completed."
else
echo ""
echo "The makefile was not created."
fi
}
# Generate compressed help files.
echo "Generating compressed help files..."
${QTBIN_PATH}qhelpgenerator Help/kactus2help.qhp -o Help/Kactus2Help.qch
${QTBIN_PATH}qcollectiongenerator Help/kactus2help.qhcp -o Help/Kactus2Help.qhc
if command -v ${QTBIN_PATH}qtchooser >/dev/null 2>&1; then
#Run qmake using qtchooser.
echo "Qtchooser found. Running qmake through qtchooser..."
${QTBIN_PATH}qtchooser -run-tool=${QTBIN_PATH}qmake -qt=qt5 Kactus2_Solution.pro
print_success
elif command -v ${QTBIN_PATH}qmake >/dev/null 2>&1; then
#Run qmake directly.
echo "Qtchooser not found. Running qmake directly..."
${QTBIN_PATH}qmake Kactus2_Solution.pro
print_success
else
echo "Qmake not found. Please set variable QTBIN_PATH to Qt binary files."
fi