Showing with 49 additions and 44 deletions.
  1. +5 −2 .travis.yml
  2. +44 −42 cmake/travis.sh
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
# Travis-CI Build for kst2
# see travis-ci.org for details

sudo: false
language: cpp
sudo: required
dist: trusty
#language: cpp


install:
- sudo apt-get -y update
- sudo apt-get -y install cmake g++-mingw-w64-i686 g++-mingw-w64-x86-64
#- sudo apt-get update
#- sudo apt-get remove cmake mingw32-binutils mingw32-runtime mingw32 mingw-w64 g++-mingw-w64 gcc-mingw-w64
#- sudo apt-get install m4 bison flex nsis-common nsis qt4-dev-tools subversion
Expand Down
86 changes: 44 additions & 42 deletions cmake/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ cd $builddir
#
# get actual cmake
#
cmakever=cmake-3.3.1-Linux-x86_64
cmakever=cmake-3.4.1-Linux-x86_64

if [ "$iam" = "$travis" ]; then
if [ ! -d $dep/$cmakever ]; then
cmakebin=x
if [ ! -d $dep/$cmakever ]; then
wget --no-check-certificate http://www.cmake.org/files/v3.3/$cmakever.tar.gz
wget --no-check-certificate http://www.cmake.org/files/v3.4/$cmakever.tar.gz
checkExitCode
cd $dep
tar xf $builddir/$cmakever.tar.gz
Expand All @@ -165,67 +165,74 @@ fi
$cmakebin --version
checkExitCode

gccver=4.7.2
server=http://sourceforge.net/projects/kst/files/3rdparty

#gccver=4.7.2
if [ "$2" = "x64" ]; then
win=win64
mingw=x86_64-w64-mingw32
exc=-seh
mingwdir=mingw64$exc
branch=Kst-64bit-no-3rdparty-plugins-Qt5
extlib=
useext=
else
win=win32
mingw=i686-w64-mingw32
branch=Kst-32bit-3rdparty-plugins-Qt5
exc=-dw2
mingwdir=mingw32$exc
branch=Kst-32bit-3rdparty-plugins-Qt5
extlib=kst-3rdparty-win32-gcc$exc-4.7.2
useext="-Dkst_3rdparty=1 -Dkst_3rdparty_dir=$dep/"$extlib
fi

if [ "$1" = "qt5" ]; then
qtver=5.5.0
tarver=
else
qtver=4.8.4
tarver=
branch=Kst-32bit-3rdparty-plugins-Qt4
fi

qtver=Qt-$qtver-$win-g++-$mingw$exc-$gccver
mingwver=$mingw-gcc$exc-$gccver
if [ $downloadgcc ]; then

gccver=4.7.2
if [ "$2" = "x64" ]; then
exc=-seh
mingwdir=mingw64$exc
else
exc=-dw2
mingwdir=mingw32$exc
fi

server=http://sourceforge.net/projects/kst/files/3rdparty
# ---------------------------------------------------------
#
# download and install mingw
#
if [ ! -d $dep/$mingwdir ]; then
mingwtar=$mingwver-Ubuntu64-12.04.tar
wget $server/$mingwtar.xz
checkExitCode
xz -d $mingwtar.xz
cd $dep
tar xf $builddir/$mingwtar
checkExitCode
cd $builddir
qtver=5.5.0
qtver=Qt-$qtver-$win-g++-$mingw$exc-$gccver
mingwver=$mingw-gcc$exc-$gccver

# ---------------------------------------------------------
#
# download and install mingw
#

if [ ! -d $dep/$mingwdir ]; then
mingwtar=$mingwver-Ubuntu64-12.04.tar
wget $server/$mingwtar.xz
checkExitCode
xz -d $mingwtar.xz
cd $dep
tar xf $builddir/$mingwtar
checkExitCode
cd $builddir
fi
compiler=$dep/$mingwdir/bin/$mingw-gcc
LTS=12.04
else
qtver=5.5.1
qtver=Qt-$qtver-$mingw
compiler=$mingw
LTS=14.04
fi
# when cross-compiler is in path cmake assumes it is a native compiler and passes "-rdynamic" which mingw doesn't support
#export PATH=$dep/mingw32/bin:$PATH
echo Checking mingw installation ...
$dep/$mingwdir/bin/$mingw-gcc -dumpversion
$compiler-gcc -dumpversion
checkExitCode



# ---------------------------------------------------------
#
# download and install Qt
#
if [ ! -d $dep/$qtver ]; then
qttar=$qtver-Ubuntu64-12.04$tarver.tar
qttar=$qtver-Ubuntu64-$LTS$tarver.tar
wget $server/$qttar.xz
checkExitCode
xz -d $qttar.xz
Expand Down Expand Up @@ -270,12 +277,7 @@ cd $builddir
#
# build Kst
#
cd $builddir
if [ "$1" = "qt5" ]; then
qtopt="-Dkst_qt5=1"
else
qtopt="-Dkst_qt4=$dep/$qtver"
fi
qtopt="-Dkst_qt5=1"


if [ $buildinstaller -eq 1 ]; then
Expand Down