summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Koenig <Joerg.Koenig@techsat.com>2019-05-30 21:04:07 (GMT)
committerJoerg Koenig <Joerg.Koenig@techsat.com>2019-05-30 21:04:07 (GMT)
commit0fca31cfad56705f9d261b8a17fcfb779c20ae5a (patch)
tree24055ca5d50dc5bbfa4bed74232fb2eb105b8546
parentbc0b081c5b9c75a6737cce1404459172d36e879f (diff)
downloadQt-0fca31cfad56705f9d261b8a17fcfb779c20ae5a.zip
Qt-0fca31cfad56705f9d261b8a17fcfb779c20ae5a.tar.gz
Qt-0fca31cfad56705f9d261b8a17fcfb779c20ae5a.tar.bz2
Change-Id: I4f8f0b472eca3bfc0a51c6857489f114441801d0
-rw-r--r--Jenkinsfile93
-rw-r--r--Jenkinsfile.old117
-rw-r--r--Makefile2
-rw-r--r--Makefile.mingw6485
4 files changed, 122 insertions, 175 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 30f1c4e..d65800e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -29,18 +29,11 @@ stage('Build') {
submoduleCfg: [],
userRemoteConfigs: [[url: REPO]]])
- stage("Linux 32 Bit Build") {
- sh '''#!/bin/bash
- GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux/gcc-8.2.0 make -f Makefile.x86-linux
- '''
- }
stage("Linux 64 Bit Build") {
sh '''#!/bin/bash
- GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux64/gcc-8.2.0 make
+ GCC_PATH=/master/DEV-Tools/gcc-suite/1.3.0/x86-linux64/gcc-8.2.0 make
'''
}
-
-
}
},
windows: {
@@ -54,24 +47,11 @@ stage('Build') {
submoduleCfg: [],
userRemoteConfigs: [[url: REPO]]])
- stage ("Windows 32 Bit Build") {
- bat '''@echo off
- set SDKDIR=C:\\dev-tools\\WinSDK\\VS2019BT\\
- set NASMDIR=C:\\dev-tools\\nasm\\2.12.01_32\\
- set MSYSDIR=C:\\dev-tools\\msys\\x86\\
- set PERLDIR=C:\\dev-tools\\perl\\x86_64-msvc\\
- set PATH=%PATH%;C:\\dev-tools\\Python\\2.7\\x86-windows\\
- buildqt32.bat
+ stage ("Windows 64 Bit MSVC Build") {
+ sh '''
+ rm -f openssl-1.0.2r/NUL
+ rm -Rf openssl-1.0.2r
'''
- }
-
- bat '''
- set MSYSDIR=C:\\dev-tools\\msys\\x86
- set PATH=%MSYSDIR%\\usr\\bin;%PATH%
- sh.exe -c "rm -f openssl-1.0.2r/NUL"
- sh.exe -c "rm -Rf openssl-1.0.2r*"
- '''
- stage ("Windows 64 Bit Build") {
bat '''@echo off
set SDKDIR=C:\\dev-tools\\WinSDK\\VS2019BT\\
set NASMDIR=C:\\dev-tools\\nasm\\2.12.01_64
@@ -81,18 +61,33 @@ stage('Build') {
buildqt64.bat
'''
}
- stash name: "qtwin", includes: "*-msvc.zip"
+ stage ("Windows 64 Bit MinGW Build") {
+ sh '''
+ echo "Cleanup prev. builds ..."
+ export PATH=/c/dev-tools/msys/x86/usr/bin:$PATH
+ rm -f openssl-1.0.2r/NUL
+ rm -Rf openssl-1.0.2r
+ cp -Rf /c/dev-tools/gcc-suite/1.3.0/x86-mingw64/gcc-8.2.0 ./
+ echo "Done."
+ '''
+ sh '''
+ export PATH=$PWD/gcc-8.2.0/bin:/c/dev-tools/msys/x86/usr/bin:$PATH
+ make -f Makefile.mingw64 all
+ rm -Rf build.$(ARCH)
+ rm -Rf install.$(ARCH)
+ '''
+ }
+ stash name: "qtwin", includes: "*-msvc.zip, *-x86-mingw64.tgz"
} catch (e) {
echo 'Windows build failed'
setBuildResult('FAILURE')
} finally {
- bat '''
- set PATH=C:\\dev-tools\\msys\\x86\\usr\\bin;%PATH%
- cd %WORKSPACE%\\openssl-1.0.2r
- sh.exe -c "rm -f NUL"
- cd %WORKSPACE%
- '''
- deleteDir()
+ sh '''
+ export PATH=/c/dev-tools/msys/x86/usr/bin:$PATH
+ rm -Rf openssl-1.0.2r
+ cd $WORKSPACE
+ '''
+ deleteDir()
}
}
}
@@ -102,41 +97,25 @@ stage ("Post processing") {
unstash name: 'qtwin'
sh '''
QT_VER=5.12.3
- #
- # remove temporary folder ...
- rm -Rf $WORKSPACE/tmp
- BASE_PATH=$WORKSPACE/tmp/$QT_VER/x86-msvc
- mkdir -p $BASE_PATH
- unzip -o $WORKSPACE/qt-$QT_VER-x86-msvc.zip -d $BASE_PATH
- rm -f $WORKSPACE/qt-$QT_VER-x86-msvc.zip
- make GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux/xgcc-8.2.0-mingw DLL_DIR=$BASE_PATH/bin XPREFIX=i686-w64-mingw32- LIBDIR=$BASE_PATH/lib dll2a
- BASE_PATH=$WORKSPACE/tmp/$QT_VER/x86_64-msvc
- mkdir -p $BASE_PATH
- unzip -o $WORKSPACE/qt-$QT_VER-x86_64-msvc.zip -d $BASE_PATH
- rm -f $WORKSPACE/qt-$QT_VER-x86_64-msvc.zip
- make GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux64/xgcc-8.2.0-mingw DLL_DIR=$BASE_PATH/bin XPREFIX=x86_64-w64-mingw32- LIBDIR=$BASE_PATH/lib dll2a
#
# cleanup temporary destination folder for final distribution ...
- rm -Rf $WORKSPACE/INST
- #
# unpack Linux archives ...
- mkdir -p $WORKSPACE/INST/$QT_VER/x86-linux
- tar -xzf $WORKSPACE/qt-$QT_VER-x86-linux.tgz -C $WORKSPACE/INST/$QT_VER/x86-linux
- rm -f $WORKSPACE/qt-$QT_VER-x86-linux.tgz
mkdir -p $WORKSPACE/INST/$QT_VER/x86-linux64
tar -xzf $WORKSPACE/qt-$QT_VER-x86-linux64.tgz -C $WORKSPACE/INST/$QT_VER/x86-linux64
- rm -f $WORKSPACE/qt-$QT_VER-x86-linux64.tgz
- mv $WORKSPACE/tmp/$QT_VER/* $WORKSPACE/INST/$QT_VER/
- cd $WORKSPACE/INST/$QT_VER/ && ln -s x86_64-msvc x86-mingw64
- cd $WORKSPACE/INST/$QT_VER/ && ln -s x86-msvc x86-mingw32
+
+ mkdir -p $WORKSPACE/INST/$QT_VER/x86_64-msvc
+ unzip -o $WORKSPACE/qt-$QT_VER-x86_64-msvc.zip -d $WORKSPACE/INST/$QT_VER/x86_64-msvc
+
+ mkdir -p $WORKSPACE/INST/$QT_VER/x86-mingw64
+ tar -xzf $WORKSPACE/qt-$QT_VER-x86-mingw64.tgz -C $WORKSPACE/INST/$QT_VER/x86-mingw64
#
# remove temporary folder ...
rm -Rf $WORKSPACE/tmp
#
# finally create the whole archive ...
- cd $WORKSPACE/INST && tar -zcf $WORKSPACE/qt-$QT_VER-bin.tgz ./
+ cd $WORKSPACE/INST && tar -zcf $WORKSPACE/qt-$QT_VER-bin_64.tgz ./
rm -Rf $WORKSPACE/INST
'''
- archiveArtifacts artifacts: 'qt-5.12.3-bin.tgz'
+ archiveArtifacts artifacts: '*.tgz, *.zip'
}
}
diff --git a/Jenkinsfile.old b/Jenkinsfile.old
deleted file mode 100644
index e1dbc75..0000000
--- a/Jenkinsfile.old
+++ /dev/null
@@ -1,117 +0,0 @@
-def REPO = 'ssh://gerrit1.techsat.local:29418/external/Qt'
-
-node ('build6-win10-64') {
- stage('Prepare environment') {
- result = sh returnStatus: true, script: '''
-CWD=`pwd`
-export WORKSPACE=`cygpath $WORKSPACE`
-rm -Rf $WORKSPACE/*
-'''
- if (result != 0) {
- echo '[FAILURE] Failed to build'
- currentBuild.result = 'FAILURE'
- sh "exit ${result}"
- }
- }
-
- stage('Prepare environment') {
- checkout([$class: 'GitSCM',
- branches: [[name: 'master']],
- doGenerateSubmoduleConfigurations: false,
- extensions: [],
- submoduleCfg: [],
- userRemoteConfigs: [[url: REPO]]])
-
- step ([$class: 'CopyArtifact',
- projectName: '202151_NG_ADS2-Tools-GCC-Suite',
- filter: 'gcc-suite-*-x86-mingw64.zip']);
-
- result = sh returnStatus: true, script: '''
-echo $HOME
-pwd
-mkdir Qt-5.9.1
-unzip gcc-suite-*-x86-mingw64.zip
-rm -f gcc-suite-*-x86-mingw64.zip
-mv gcc-* gcc
-'''
- if (result != 0) {
- echo '[FAILURE] Failed to build'
- currentBuild.result = 'FAILURE'
- sh "exit ${result}"
- }
- }
-
- stage('unzip qt') {
- result = sh returnStatus: true, script: '''
-TOP=`pwd`
-cd SOURCE
-/c/"Program Files"/7-Zip/7z.exe x qt-everywhere-opensource-src-*.zip -o.. -y -r
-cd ..
-'''
- if (result != 0) {
- echo '[FAILURE] Failed to build'
- currentBuild.result = 'FAILURE'
- sh "exit ${result}"
- }
- }
-
- stage('configure qt') {
- result = sh returnStatus: true, script: '''
-TOP=`pwd`
-export WORKSPACE=`cygpath $WORKSPACE`
-P=`cygpath $DSB_PKGS/x86-mingw64/msys/usr/bin`
-export PATH=$WORKSPACE/gcc/bin:$P
-hash -r gcc
-hash -r g++
-gcc --version
-cp -f $WORKSPACE/SOURCE/win32-g++.nativ.qmake.conf $WORKSPACE/qt-everywhere-opensource-src-5.9.1/qtbase/mkspecs/win32-g++/qmake.conf
-cd $WORKSPACE/qt-everywhere-opensource-src-5.9.1
-./configure -prefix $WORKSPACE/Qt-5.9.1 -release -opensource -confirm-license -optimized-tools -strip -platform win32-g++ -opengl desktop -nomake tests
-'''
- if (result != 0) {
- echo '[FAILURE] Failed to build'
- currentBuild.result = 'FAILURE'
- sh "exit ${result}"
- }
- }
-
- stage('build qt') {
- result = sh returnStatus: true, script: '''
-export WORKSPACE=`cygpath $WORKSPACE`
-cd $WORKSPACE
-TOP=`pwd`
-P=`cygpath $DSB_PKGS/x86-mingw64/msys/usr/bin`
-export PATH=$WORKSPACE/gcc-7.1.0/bin:$P
-hash -r gcc
-hash -r g++
-gcc --version
-cd qt-everywhere-opensource-src-5.9.1
-make -j2
-'''
- if (result != 0) {
- echo '[FAILURE] Failed to build'
- currentBuild.result = 'FAILURE'
- sh "exit ${result}"
- }
- }
-
- stage('install qt') {
- result = sh returnStatus: true, script: '''
-export WORKSPACE=`cygpath $WORKSPACE`
-TOP=`pwd`
-P=`cygpath $DSB_PKGS/x86-mingw64/msys/usr/bin`
-export PATH=$WORKSPACE/gcc-7.1.0/bin:$P
-hash -r gcc
-hash -r g++
-gcc --version
-cd qt-everywhere-opensource-src-5.9.1
-make -i install
-'''
- if (result != 0) {
- echo '[FAILURE] Failed to build'
- currentBuild.result = 'FAILURE'
- sh "exit ${result}"
- }
- }
-}
-
diff --git a/Makefile b/Makefile
index 7ae9130..84fc3f9 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ SSL_ARCHIVE=openssl-$(SSL_VERSION).tar.gz
PACKAGE_NAME = qt-$(VERSION)
-GCC_PATH ?= /opt/dev-tools/gcc/8.2.0/x86-linux64/gcc-8.2.0
+GCC_PATH ?= /opt/dev-tools/gcc-suite/1.3.0/x86-linux64/gcc-8.2.0
CC ?= $(GCC_PATH)/bin/gcc
CXX ?= $(GCC_PATH)/bin/g++
diff --git a/Makefile.mingw64 b/Makefile.mingw64
new file mode 100644
index 0000000..e638416
--- /dev/null
+++ b/Makefile.mingw64
@@ -0,0 +1,85 @@
+TOP = $(shell readlink -f .)
+
+ARCH = x86-mingw64
+
+LOCAL_BUILD_PATH = $(TOP)/build.$(ARCH)
+LOCAL_INST_PATH = $(TOP)/install.$(ARCH)
+
+VERSION_SHORT = 5.12
+VERSION_RELEASE = 3
+VERSION = $(VERSION_SHORT).$(VERSION_RELEASE)
+
+SSL_VERSION = 1.0.2r
+SSL_ARCHIVE = openssl-$(SSL_VERSION).tar.gz
+
+PACKAGE_NAME = qt-$(VERSION)-$(ARCH)
+
+all: download ssl qt
+
+ssl: ssl.$(ARCH)
+qt: qt.$(ARCH)
+
+download:
+ $(MAKE) -C ./SOURCE
+
+ssl.$(ARCH):
+ rm -Rf $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION)
+ mkdir -p $(LOCAL_BUILD_PATH)/
+ cd $(LOCAL_BUILD_PATH) && \
+ tar --force-local -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE)
+ cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \
+ export CFLAGS="-m64 -fpic" && \
+ ./Configure --prefix=$(LOCAL_INST_PATH)/openssl shared mingw64 && \
+ make clean && \
+ make && \
+ make install
+
+qt.$(ARCH):
+ mkdir -p $(LOCAL_BUILD_PATH)
+ rm -Rf $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION)
+ if ! [ -d $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) ]; then \
+ cd $(LOCAL_BUILD_PATH); \
+ tar --force-local -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz; \
+ fi
+ cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \
+ rm -f config.cache && \
+ patch -p1 < $(TOP)/SOURCE/qt-5.12.3.mingw64.patch && \
+ ./configure \
+ -platform win32-g++ \
+ -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)/$(ARCH) \
+ -recheck-all \
+ -shared \
+ -release \
+ -strip \
+ -ssl \
+ -nomake examples \
+ -nomake tests \
+ -skip qtwebengine \
+ -skip qtwebglplugin \
+ -skip qtwayland \
+ -skip qtlocation \
+ -skip qtdoc \
+ -skip qtgamepad \
+ -skip qtsensors \
+ -skip qtmultimedia \
+ -skip qtactiveqt \
+ -qt-zlib \
+ -qt-libjpeg \
+ -qt-libpng \
+ -qt-pcre \
+ -qt-freetype \
+ -opengl desktop \
+ -openssl \
+ -I$(LOCAL_INST_PATH)/openssl/include \
+ -L$(LOCAL_INST_PATH)/openssl/lib \
+ -L$(GCC_PATH)/lib \
+ -opensource \
+ -confirm-license && \
+ make && \
+ make install
+ cd $(LOCAL_INST_PATH)/qt-$(VERSION)/$(ARCH) && \
+ tar --force-local -zcf $(TOP)/$(PACKAGE_NAME).tgz ./
+
+clean:
+ rm -Rf build.$(ARCH)
+ rm -Rf install.$(ARCH)