build-qt.sh(Cross compile in Linux for Windows)
#!/bin/bash
set -e
MINGW=${MINGW:-${ARCH:-x86_64}-w64-mingw32}
PREFIX=${PREFIX:-usr}
WORKSPACE=${WORKSPACE:-$(pwd)}
TARGET=${TARGET:-${WORKSPACE}}
WINREQ=${WINREQ:-${TARGET}/${PREFIX}}
BUILD_NUMBER=${BUILD_NUMBER:-}
ARCH=${ARCH:-${MINGW%%-*}}
BINDIR=${BINDIR:-${PREFIX}/exe}
LIBDIR=${LIBDIR:-${PREFIX}/exe}
PLUGINDIR=${PLUGINDIR:-${PREFIX}/exe}
WININC=${WININC:-${WINREQ}/include}
WINLIB=${WINLIB:-${WINREQ}/exe}
version=
download=
; do
case "$1" in
(-h|--help)
cat<<EOF
$ [OPTIONS] [CONFIGURE-ARGUMENTS]
OPTIONS:
-h, --help show this help
-z, --zip create zip package
-v, --version specify version string
-d, --download download sources
otherwise sources must be in $(pwd)
CONFIGURE-ARGUMENTS:
Arguments that are passed to configure.
VARIABLES:
MINGW mingw parameter (default: $MINGW)
PREFIX relative installation prefix (default: $PREFIX)
WORKSPACE workspace path (default: $WORKSPACE)
WINREQ path to required windows libraries (default: $WINREQ)
TARGET installation target (default: $TARGET)
BUILD_NUMBER build number (default: $BUILD_NUMBER)
ARCH architecture (default: $ARCH)
BINDIR install dir for exe files (default: $BINDIR)
LIBDIR install dir for dll files (default: $LIBDIR)
PLUGINDIR install dir for qt plugins (default: $PLUGINDIR)
WININC path to required windows include files (default: $WININC)
WINLIB path to required windows libraries (default: $WINLIB)
DEPENDENCIES:
openssl /build-openssl.sh
icu /build-icu.sh
Builds QT for Windows
EOF
exit
;;
(-d|--download) download=;;
(-v|--version) shift; version="$1";;
(-z|--;;
(*) break;;
esac
; then
>&
exit
fi
shift
done
set -x
cd ${WORKSPACE}
; then
git clone https://code.qt.io/qt/qt5.git qt5
cd qt5
if test -z "$version"; then
version=$(git branch -r | )
fi
git checkout "$version"
perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
elif test -d qt5; then
cd qt5
fi
if test -z "$version"; then
version=$(git branch | sed -n 's,^\* *,,p')
fi
path=qt-${version}
[[ -.]+$ ]]
echo "Version: $version"
echo "Package: $path"
git submodule foreach --recursive "git clean -dfx"
# bugfixes:
# MinGW has no uiviewsettingsinterop.h
sed -i '/^ *# *define *HAS_UI_VIEW_SETTINGS_INTEROP *$/d' qtbase/src/plugins/platforms/windows/qwin10helpers.cpp
# https://bugreports.qt.io/browse/QTBUG-38223
sed -i '/option(host_build)/d' qtactiveqt/src/tools/idc/idc.pro
# /workdir/qtwinextras/src/winextras
# qwinjumplist.:: error: ‘SHCreateItemFromParsingName’ was not declared in this scope
sed -i '/# *if *defined *( *_WIN32_IE *) *&& *_WIN32_IE *<< *0x0700/{s,<<,<,}' qtwinextras/src/winextras/qwinjumplist.cpp
# in qtexttospeech_sapi.cpp file sphelper.h is missing → "-skip qtspeech"
./configure -v -recheck-all -opensource -confirm-license \
-xplatform win32-g++ -device-option CROSS_COMPILE=${MINGW}- \
-no-compile-examples \
-I"${WININC}" \
-L"${WINLIB}" \
-prefix "${TARGET}/${PREFIX}" \
-bindir "${TARGET}/$BINDIR" \
-libdir "${TARGET}/$LIBDIR" \
-plugindir "${TARGET}/$PLUGINDIR" \
-libexecdir "${TARGET}/$LIBDIR" \
-system-proxies \
-opengl desktop \
-openssl-runtime \
-skip qtspeech \
-skip qtlocation \
-shared \
-release \
$*
make
make install
# bugfixes:
# Qt pkg-config files link to debug version in release build
# https://bugreports.qt.io/browse/QTBUG-60028
for f in "${TARGET}/${LIBDIR}"/pkgconfig/*.pc; do
sed -i 's,\(-lQt5[-_a-zA-Z0-9]*\)d,\1,g' "$f"
done
if test $zip -eq 1; then
cd "${TARGET}"
zip -r "${path}~windows.${BUILD_NUMBER}_${ARCH}.zip" "${PREFIX}"
fi
https://github.com/mwaeckerlin/mingw/blob/master/build-qt.sh
build-qt.sh(Cross compile in Linux for Windows)的更多相关文章
- 2018.4.12 各个系统安装MyEclipse过程(包括Mac、Linux、Windows)
首先下载MyEclipse 最新官网在这里http://www.myeclipsecn.com/ mac 安装 . 在安装第一步会显示 "安装myeclipse显示更低版本javase6&q ...
- 新成员!Visual Studio Code --跨平台的开发工具(支持OSX, Linux 和 Windows)
原文出处:新成员!Visual Studio Code --跨平台的开发工具(支持OSX, Linux 和 Windows) 这是我的文章备份 http://www.dotblogs.com.tw/ ...
- 磁盘IO性能监控(Linux 和 Windows)
磁盘IO性能监控(Linux 和 Windows) 作者:终南 <li.zhongnan@hotmail.com> 磁盘的IO性能是衡量计算机总体性能的一个重要指标.Linux提供了i ...
- java获取本机器的IP(linux和windows)
目录 描述 方案描述 获取Windows下的IP 获取linux下的IP 判断操作系统的类型 最后将上面三个方法进行整合 参考 描述 由于项目是部署在集群上的,需要项目能够自动采集各机器的信息.jav ...
- ISE(Iris Server Engine)是一个基于现代C++的跨平台(Linux和Windows)框架
ISE(Iris Server Engine)是一个基于现代C++的跨平台(Linux和Windows)的高性能多线程并发网络服务器程序框架.它封装了琐碎的socket以及各种操作系统APIs,以面向 ...
- LoadRunner 服务器(Linux、Windows) 性能指标度量说明
服务器资源性能计数器 下表描述了可用的计数器: 监控器 度量 说明 CPU 监控器 Utilization 监测 CPU 利用率. 磁盘空间监控器 Disk space 监测可用空间 (MB) 和已用 ...
- openCV 简单实现身高测量(未考虑相机标定,windows)
(一) OpenCV3.1.0+VS2015开发环境配置 下载OpenCV安装包(笔者下载3.1.0版本) 环境变量配置(opencv安装路径\build\x64\vc14\bin,注意的是x64文件 ...
- 静态编译Qt5.4.1和Qt WebKit(网事如风的blog)good
blog文章地址:http://godebug.org/index.php/archives/133/ WebKit是个好东西,做爬虫.显示网页还是想用HTML来做桌面应用的界面都可以用他,不过一直以 ...
- 原创)CentOS6.4下安装xampp(一定要在linux上下载)
一.xampp下载地址: http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/ 二.我下载的是xampp-linux-x64 ...
随机推荐
- js如何将字符串作为函数名调用函数
js将如何字符串作为函数名调用函数 一.总结 一句话总结:用eval来实现.eval可以执行参数字符串. 二.js将字符串作为函数名调用函数 比如我现在有一个字符串str = "func_a ...
- 试用 Tomcat7.x 与 Tomcat6.x 的明显不同 + Context 填写方法 + 默认应用配置方法 (zhuan)
http://blog.csdn.net/shanelooli/article/details/7408675
- HDU4876:ZCC loves cards
Problem Description ZCC loves playing cards. He has n magical cards and each has a number on it. He ...
- php中如何获取数组长度
php获取数组的长度的方法 一.总结 一句话总结:count方法和sizeof方法 二.php获取数组的长度的方法 php获取数组长度的方法: 一). 获取一维数组的方法: 1.count.sizeo ...
- <a href='javacript:' title='{$str}'>是什么意思(多看学习视频)
<a href='javacript:' title='{$str}'>是什么意思(多看学习视频) 一.总结 一句话总结: 1.javascript:是什么? 伪协议,后面接javascr ...
- while 常见程序逻辑
1. 查找 List L; Position P = L; while (P && P->Element != Key) { P = P->Next; } return P ...
- Framework for Graphics Animation and Compositing Operations
FIELD OF THE DISCLOSURE The subject matter of the present disclosure relates to a framework for hand ...
- php课程 6-22 字符串格式化函数有哪些(精问)
php课程 6-22 字符串格式化函数有哪些(精问) 一.总结 一句话总结: 1.猜测一下$_GET()怎么来的? 函数赋值给变量的操作:$_YZM=get(); 这样就可以很好的解释哪些全局变量 ...
- Android中实现iPhone开关
前一段时间在做项目的时候遇到了一个问题,美工在设计的时候设计的是一个iPhone中的开关,但是都知道Android中的Switch开关和IOS中的不同,这样就需要通过动画来实现一个iPhone开关了. ...
- ZOJ Monthly, June 2014 解题报告
A.Another Recurrence Sequence problemId=5287">B.Gears 题目大意:有n个齿轮,一開始各自为一组.之后进行m次操作,包含下面4种类型: ...