Skip to content

Commit

Permalink
Dependency update: New Qt check & Arch support
Browse files Browse the repository at this point in the history
 - New way to check if Qt is installed
 - Arch is now supported for getting dependencies
  • Loading branch information
lewisjb committed Jul 26, 2016
1 parent 2d4c78c commit 456e344
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
26 changes: 14 additions & 12 deletions scripts/check-dependencies.sh
Expand Up @@ -163,16 +163,16 @@ gmp_sysver()
qt_sysver()
{
if [ "`command -v qtchooser`" ]; then
if qtchooser -run-tool=qmake -qt=5 -v >/dev/null 2>&1 ; then
qtver=`qtchooser -run-tool=qmake -qt=5 -v 2>&1`
if [ $? -eq 0 ] ; then
export QT_SELECT=5
qtpath="`qtchooser -run-tool=qmake -qt=5 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
fi
if [ ! -e "$qtpath" ]; then
if qtchooser -run-tool=qmake -qt=4 -v >/dev/null 2>&1 ; then
export QT_SELECT=4
qtpath="`qtchooser -run-tool=qmake -qt=4 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
else
qtver=`qtchooser -run-tool=qmake -qt=4 -v 2>&1`
if [ $? -eq 0 ] ; then
export QT_SELECT=4
fi
fi
qtver=`echo "$qtver" | grep "Using Qt version" | awk '{print $4}'`
else
export QT_SELECT=5
qtpath=$1/include/qt5/QtCore/qglobal.h
Expand All @@ -194,12 +194,14 @@ qt_sysver()
qtpath=$1/qt4/include/QtCore/qglobal.h
fi
fi
if [ ! -e "$qtpath" ]; then
unset QT_SELECT
return
if [ -z "$qtver" ]; then
if [ ! -e "$qtpath" ]; then
unset QT_SELECT
return
fi
qtver=`grep 'define *QT_VERSION_STR *' $qtpath | awk '{print $3}'`
qtver=`echo $qtver | sed s/'"'//g`
fi
qtver=`grep 'define *QT_VERSION_STR *' $qtpath | awk '{print $3}'`
qtver=`echo $qtver | sed s/'"'//g`
qt_sysver_result=$qtver
}

Expand Down
8 changes: 8 additions & 0 deletions scripts/uni-get-dependencies.sh
Expand Up @@ -148,6 +148,12 @@ get_ubuntu_14_deps()
get_debian_8_deps
}

get_arch_deps()
{
pacman -S --noconfirm qt5 qscintilla-qt5 cgal gmp mpfr boost \
opencsg glew eigen glib2 fontconfig freetype2 harfbuzz bison flex make
}

unknown()
{
echo "Unknown system type. Please install the dependency packages listed"
Expand Down Expand Up @@ -187,6 +193,8 @@ if [ -e /etc/issue ]; then
get_mageia_deps
elif [ "`grep -i qomo /etc/issue`" ]; then
get_qomo_deps
elif [ "`grep -i arch /etc/issue`" ]; then
get_arch_deps
elif [ "`command -v rpm`" ]; then
if [ "`rpm -qa | grep altlinux`" ]; then
get_altlinux_deps
Expand Down

0 comments on commit 456e344

Please sign in to comment.