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 ...
随机推荐
- 读Effective Objective-C [提高OC代码质量总结笔记第一篇:熟悉OC]
一.OC特性 OC 为 C 语言添加了面向对象特性,是其超集; OC 使用动态绑定的消息结构,也就是,在运行时才会检查对象类型; 接收一条消息后,究竟应执行何种代码,由运行期环境来决定,而非 编译器; ...
- 【Solr专题之九】SolrJ教程 分类: H4_SOLR/LUCENCE 2014-07-28 14:31 2351人阅读 评论(0) 收藏
一.SolrJ基础 1.相关资料 API:http://lucene.apache.org/solr/4_9_0/solr-solrj/ apache_solr_ref_guide_4.9.pdf:C ...
- php面试题6
php面试题6 一.总结 二.php面试题6 写出你认为语言中的高级函数:1)preg_replace()2)preg_match()3) ignore_user_abort()4) debug_ba ...
- USB 3.0规范中译本 第5章 机械结构
本文为CoryXie原创译文,转载及有任何问题请联系cory.xie#gmail.com. 本章定义USB 3.0连接器和线缆组件的form, fit 和 function.包括以下方面: • 连接器 ...
- SSL/TLS协议运行机制的概述(转)
互联网的通信安全,建立在SSL/TLS协议之上. 本文简要介绍SSL/TLS协议的运行机制.文章的重点是设计思想和运行过程,不涉及具体的实现细节.如果想了解这方面的内容,请参阅RFC文档. 一.作用 ...
- Mina框架项目运用
近期最一个项目对通信要求比較严格,须要建立长连接,且能处理多并发,所以选择了Mina框架.以下就简单记录开发的过程吧: mina 开发须要的jar包: mina pc端通信: 服务端: package ...
- arm-linux内存管理学习笔记(1)-内存页表的硬件原理
linux kernel集中了世界顶尖程序猿们的编程智慧,犹记操作系统课上老师讲操作系统的四大功能:进程调度 内存管理 设备驱动 网络.从事嵌入式软件开发工作,对设备驱动和网络接触的比較多. 而进程调 ...
- php课程 6-20 字符串基础和去除空格和字符串填补函数
php课程 6-20 字符串基础和去除空格和字符串填补函数 一.总结 一句话总结: 二.字符串 字符串定义:$str='hello world!'; 输出字符串:echo $str;print $s ...
- ITFriend创业败局(序):简要概述我的第一次创业经历
是时候, 面对过去,继续踏上未来之路了. 是时候,该给自己一个交待了,给ITFriend创业合伙人.ITFriend用户.关注我的朋友和网友们一个答复了. 是时候,全面认真总结过去的经历. ...
- 关于在方法里面使用泛型public static <T> T
对泛型的理解一直处于模糊的状态,所以今天就专门看了看泛型,看到了如下的一段代码,网上没有找到相应的解释. 然后尝试着自己理解了一下,第一次写博客,手比较生. 现在就开始来写我的理解. 看到这个方法的第 ...