[Kst] branches/work/kst/portto4/kst

Peter Kümmel syntheticpp at gmx.net
Tue Aug 28 13:36:45 UTC 2012


SVN commit 1313691 by kuemmel:

Qt5 needs the platforms plugin

 M  +2 -2      .travis.yml  
 M  +1 -0      cmake/CMakeLists.txt  
 M  +12 -1     cmake/misc/CMakeLists.txt  
 M  +2 -2      cmake/modules/KstCrossCompile.cmake  
 M  +27 -29    cmake/travis.sh  


--- branches/work/kst/portto4/kst/.travis.yml #1313690:1313691
@@ -10,8 +10,8 @@
  - sudo apt-get install mingw-w64
 
 script:
- - ./cmake/travis.sh w64 
-# - ./cmake/travis.sh w64 qt5
+ - ./cmake/travis.sh qt4
+ - ./cmake/travis.sh qt5
 
 branches:
  only:
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1313690:1313691
@@ -40,6 +40,7 @@
 kst_option(bool   OFF all python_build      "Download and build NumPy/SciPy then install Python support")
 kst_option(string ""  all python_prefix     "Path for installing python bindings")
 kst_option(string OFF all cross             "Cross-compile on Linux for Windows")
+kst_option(string ""  all qt4               "Use cross compiled Qt4 at given path")
 kst_option(string ""  all qt5               "Use Qt5 at given path")
 kst_option(bool   ON  all qt5base_only      "Only use Qt5 features available in qtbase")
 kst_option(bool   ON  all opengl            "Use OpenGL")
--- branches/work/kst/portto4/kst/cmake/misc/CMakeLists.txt #1313690:1313691
@@ -10,6 +10,11 @@
 			${QT_BINARY_DIR}/QtNetwork5.dll				
 			DESTINATION bin
 			CONFIGURATIONS Release)
+		install(FILES
+			${QT_BINARY_DIR}/../plugins/platforms/qminimal5.dll
+			${QT_BINARY_DIR}/../plugins/platforms/windows5.dll			
+			DESTINATION bin/platforms
+			CONFIGURATIONS Release)
 	else()
 		install(FILES
 			${QT_BINARY_DIR}/QtCore4.dll
@@ -32,14 +37,20 @@
 	endif()
 endif()
 
-if(MINGW AND NOT kst_cross)
+if(MINGW)
+	if(kst_cross)
+		set(MINGW_BIN_PATH /usr/lib/gcc/${kst_cross}/4.6)
+	else()
 	get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
+	endif()
 	if(EXISTS ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
 		list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
 	elseif(EXISTS ${MINGW_BIN_PATH}/libwinpthread-1.dll)
 		list(APPEND runtime ${MINGW_BIN_PATH}/libwinpthread-1.dll)
 	endif()
+	if(EXISTS ${MINGW_BIN_PATH}/libstdc++-6.dll)
 	list(APPEND runtime ${MINGW_BIN_PATH}/libstdc++-6.dll)
+	endif()
 	install(FILES ${runtime} DESTINATION bin)
 endif()
 
--- branches/work/kst/portto4/kst/cmake/modules/KstCrossCompile.cmake #1313690:1313691
@@ -12,9 +12,9 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 
-if (NOT kst_qt5)
+if(kst_qt4)
 	# Cross-compiled Qt, branch cross-mingw from https://gitorious.org/~syntheticpp/qt/qt4
-	set(QT_MINGW_DIR /usr/local/Trolltech/Qt-win32-g++-${TOOLNAME} CACHE PATH "Qt for Mingw" FORCE)
+	set(QT_MINGW_DIR ${kst_qt4} CACHE PATH "Qt for Mingw" FORCE)
 	set(CMAKE_FIND_ROOT_PATH /usr/${TOOLNAME} ${QT_MINGW_DIR} CACHE PATH "Mingw find root path" FORCE)
 endif()
 
--- branches/work/kst/portto4/kst/cmake/travis.sh #1313690:1313691
@@ -50,55 +50,47 @@
 #
 # select mingw version
 #
-if [ "$1" = "w64" ]; then
     mingw=i686-w64-mingw32
-else
-    mingw=i586-mingw32msvc
-fi
 
 
 #
 # get actual cmake 
 #
+if [ "$iam" = "$travis" ]; then
 cd ..
+    if [ ! -d $PWD/cmake-2.8.9-Linux-i386 ]; then
 wget http://www.cmake.org/files/v2.8/cmake-2.8.9-Linux-i386.tar.gz
 tar xf cmake-2.8.9-Linux-i386.tar.gz
+    fi
 cmakebin=$PWD/cmake-2.8.9-Linux-i386/bin/cmake
 cd $builddir
+else
+    cmakebin=cmake
+fi
 
 #
 # download and install Qt
 #
-if [ "$2" = "qt5" ]; then
-    if [ ! -d /usr/local/Qt-5.0.0-win32-g++-$mingw ]; then
-        qttar=Qt-5.0.0-win32-g++-$mingw-4.6.1-Ubuntu-11.10.tar
-        qt=$builddir/$qttar
-        wget https://github.com/downloads/syntheticpp/kst/$qttar.bz2
-        checkExitCode
-        bzip2 -d $qttar.bz2
-        cd /usr/local
-        sudo tar xf $qt
-        checkExitCode
-        echo Checking Qt installation ...
-        /usr/local/Qt-5.0.0-win32-g++-$mingw/bin/qmake -query
-        checkExitCode
-    fi
+if [ "$1" = "qt5" ]; then
+    qtver=5.0.0
 else
-    if [ ! -d /usr/local/Trolltech/Qt-win32-g++-$mingw ]; then
-        #qttar=Qt-win32-g++-$mingw-4.6.3-dlls-Ubuntu-12.04.tar
-        qttar=Qt-win32-g++-$mingw-4.6.1-Ubuntu-11.10.tar
-        qt=$builddir/$qttar
+    qtver=4.8.3
+fi
+qtver=Qt-$qtver-win32-g++-$mingw
+    
+if [ ! -d /opt/$qtver ]; then
+    qttar=$qtver-Ubuntu-11.10.tar
         wget https://github.com/downloads/syntheticpp/kst/$qttar.xz
         checkExitCode
         xz -d $qttar.xz
         cd /
-        sudo tar xf $qt
+    sudo tar xf $builddir/$qttar
         checkExitCode
         echo Checking Qt installation ...
-        /usr/local/Trolltech/Qt-win32-g++-$mingw/bin/qmake -query
+    readelf -h  /opt/$qtver/bin/qmake
+    /opt/$qtver/bin/qmake -query
         checkExitCode
     fi
-fi
 
 #
 # build Kst
@@ -106,14 +98,15 @@
 date=`date --utc '+%Y.%m.%d-%H.%M'`
 ver=2.0.6
 cd $builddir
-if [ "$2" = "qt5" ]; then
+if [ "$1" = "qt5" ]; then
     ver=$ver-Qt5
-    qt5opt="-Dkst_qt5=/usr/local/Qt-5.0.0-win32-g++-$mingw -Dkst_opengl=0"
+    qtopt="-Dkst_qt5=/opt/$qtver -Dkst_opengl=0"
 else
 	ver=$ver-Qt4
+    qtopt="-Dkst_qt4=/opt/$qtver -Dkst_opengl=0"
 fi
 installed=Kst-$ver-$date
-$cmakebin ../kst/cmake/ -Dkst_release=1 -Dkst_version_string=$ver-$date -Dkst_cross=$mingw -Dkst_install_prefix=./$installed $qt5opt
+$cmakebin ../kst/cmake/ -Dkst_release=1 -Dkst_version_string=$ver-$date -Dkst_cross=$mingw -Dkst_install_prefix=./$installed $qtopt
 checkExitCode
 
 make -j $processors
@@ -141,9 +134,12 @@
 if [ "$iam" = "$travis" ]; then
     git config --global user.name "travis"
     git config --global user.email travis at noreply.org
-fi
+
 git clone --quiet git at github.com:syntheticpp/kstbinary.git
 cd kstbinary
+    if [ "$1" = "qt5" ]; then
+        git checkout Qt5
+    fi
 git reset --hard HEAD^
 cp -f ../$installed-win32.zip .
 git add $installed-win32.zip
@@ -154,6 +150,8 @@
 
 git push --quiet -f
 checkExitCode
+fi
 
+
 cd $startdir
 


More information about the Kst mailing list