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 ...
随机推荐
- hdu 3306 Another kind of Fibonacci(矩阵高速幂)
Another kind of Fibonacci Time Limit: 3000/10 ...
- Spring Tool Suite(STS)加速
Java开发首选技术是Spring,使用Spring技术首选的开发工具是STS,STS有许多加速spring开发的提示和快捷方式,并将spring的最新技术通过STS快速简单的传递给用户. 但是STS ...
- eclipse去掉js验证
第一步:去除eclipse的js验证:window->preference->Java Script->Validator->Errors/Warnings->Enabl ...
- [CSS] Conditionally Apply Styles Using Feature Queries @supports
While browsers do a great job of ignoring styles they don’t understand, it can be useful to provide ...
- 【C++竞赛 A】xxx的项链
时间限制:2s 内存限制:64MB 问题描述 xxx有一个长度为n的宝石链,宝石有m种不同的颜色.xxx想截取其中连续的一段做一个项链.为了让项链更漂亮,xxx希望项链中的宝石包含所有颜色. 输入描述 ...
- POJ2112 Optimal Milking 【最大流+二分】
Optimal Milking Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 12482 Accepted: 4508 ...
- [Most.js] Create Streams From Single Values With Most.js
Most provides many means for creating streams, the simplest of which is the offunction. In this less ...
- 从0到1打造直播 App(直播流程介绍整理 <mark><转>)
注明:原创 2016-10-27 李智文 腾讯Bugly 概要 分享内容: 互联网内容载体变迁历程,文字——图片/声音——视频——VR/AR——……..从直播1.0秀场时代(YY),2.0游戏直播(斗 ...
- [.NET Core 32]升级vs code之后,vs code无法调试net core web项目
错误提示&处理方法 参考链接:https://github.com/OmniSharp/omnisharp-vscode/issues/1742 错误:The .NET Core debugg ...
- amazeui中内置的web组件有哪些且如何用
amazeui中内置的web组件有哪些且如何用 一.总结 一句话总结: 1.组件还是jquery.js+amazeui.js,和插件一样,准确的说是amazeui.css+jquery.js+amaz ...