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 ...
随机推荐
- [Angular2 Animation] Use Keyframes for Fine-Tuned Angular 2 Animations
When easing isn’t enough to get the exact animation you want, you can leverage keyframes to define a ...
- php面试题6
php面试题6 一.总结 二.php面试题6 写出你认为语言中的高级函数:1)preg_replace()2)preg_match()3) ignore_user_abort()4) debug_ba ...
- GeoTiff如何存储颜色表的研究
作者:朱金灿 来源:http://blog.csdn.net/clever101 在一次偶然的机会中得知tiff图像时可以存诸颜色表的,心想以后用GeoTiff来保存图像分类图像就十分方便了.于是研究 ...
- Android 节日短信送祝福(功能篇:1-数据库操作类与自定义ContentProvider)
首先,还是展示一下部分目录结构: 在节日短信送祝福的功能实现方面,为了能够方便直观展示实现过程,小编我以Java文件为基础,一个一个来展示,免得到时候这个java文件写点,一下又跳到另外一个java ...
- 网络拓扑图js插件——jTopo应用
jTopo官网:http://www.jtopo.com/ 1.特点: 基于HTML5 Canvas,不依赖其他库 2.应用: 效果: 源码github地址 在HTML页面中引入jtopo.min.j ...
- tplink-如何远程WEB管理路由器?
http://service.tp-link.com.cn/detail_article_185.html 如何远程WEB管理路由器? 新版tplink怎么远程Web管理? https://www.1 ...
- 摘录-Mybatis - Integer值为0的数据 return false
Mybatis在进行<if test="status != null and status != ''">判空操作时,如果status为0的时候,该判断条件的值为fal ...
- 【54.38%】【BZOJ 4300】绝世好题
Time Limit: 1 Sec Memory Limit: 128 MB Submit: 1120 Solved: 609 [Submit][Status][Discuss] Descript ...
- js进阶 11-3 jquery中css属性如何操作
js进阶 11-3 jquery中css属性如何操作 一.总结 一句话总结:通过css()方法 1.attr和css是有交叉的,比如width,两者中都可以设置,那么他们的区别是什么? 其实通俗一点 ...
- SQL Server高速生成SQL增删改查语句
你还在手写程序生成SQL语句吗?你还在为由于马虎出错的SQL语句而感到无语吗?你还在为不知如何表达复杂的SQL语句而纠结吗?假设你的回答为"是".那你就OUT啦.快来试试应用SQL ...