#! /bin/sh
SRC=$PWD
echo $SRC
QTDIR=/usr/local/QT/51210/
echo $QTDIR
QTSDK=$QTDIR
echo $QTSDK
QMake=$QTSDK/bin/qmake
echo $QMake
buildDir=$SRC/../../code/release-build
echo $buildDir
Profilepath=$4
echo $Profilepath
echo "由于export重定位了环境编译,造成编译qt源码时也需要第三方的库依赖支持,编译qt/界面前,请先运行make_third.sh"
export C_INCLUDE_PATH=$thirdDir/include/:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$thirdDir/include/
export LD_LIBRARY_PATH=$thirdDir/lib/:$thirdDir/lib64/
CPUCoreNum=`cat /proc/cpuinfo | grep processor | wc -l`
echo $CPUCoreNum
cd $QTDIR #工程路径
#TARGET=ETSMJBZUI1
print_line(){
echo "========================================================"
}
build_proc_kylinV10(){
setBuildPlatform=$1
case $setBuildPlatform in
"lx_mips")
setBuildPlatform=MIPS64
# echo "编译mips龙芯......"
;;
"zx")
setBuildPlatform=AMD64
# echo "编译amd64兆芯........."
;;
"yh")
setBuildPlatform=AARCH64
# echo "编译aarch64银河........."
;;
"fd")
setBuildPlatform=AMD64
# echo "编译amd64方德........."
;;
"loongarch64")
setBuildPlatform=LOONGARCH64
# echo "编译Loongarch64........."
;;
*)
echo "编译时未指定平台[ fd zx lx yh]......"
exit -1
;;
esac
if [ ! -d "$buildDir" ];then
mkdir -p $buildDir
fi
cd $buildDir
echo $QMake $Profilepath
$QMake -r -spec linux-g++ CONFIG+=$setBuildPlatform -o Makefile $Profilepath
if [ -f "Makefile" ];then
make -j $CPUCoreNum
else
echo "can not build...."$buildDir"/Makefile"" inexistence"
exit -1
fi
}
build_proc_kylinV10Sp1(){
setBuildPlatform=$1
case $setBuildPlatform in
"lx_mips")
setBuildPlatform=MIPS64
# echo "编译mips龙芯......"
;;
"zx")
setBuildPlatform=AMD64
# echo "编译amd64兆芯........."
;;
"yh")
setBuildPlatform=AARCH64
# echo "编译aarch64银河........."
;;
"fd")
setBuildPlatform=AMD64
# echo "编译amd64方德........."
;;
"loongarch64")
setBuildPlatform=LOONGARCH64
# echo "编译Loongarch64........."
;;
*)
echo "编译时未指定平台[ fd zx lx yh]......"
exit -1
;;
esac
if [ ! -d "$buildDir" ];then
mkdir -p $buildDir
fi
cd $buildDir
echo $QMake $Profilepath
$QMake -r -spec linux-g++ CONFIG+=$setBuildPlatform CONFIG+=KYLINV10SP1 -o Makefile $Profilepath
if [ -f "Makefile" ];then
make -j $CPUCoreNum
else
echo "can not build...."$buildDir"/Makefile"" inexistence"
exit -1
fi
}
build_proc_uos(){
setBuildPlatform=$1
case $setBuildPlatform in
"lx_mips")
setBuildPlatform=MIPS64
# echo "编译mips龙芯......"
;;
"zx")
setBuildPlatform=AMD64
# echo "编译amd64兆芯........."
;;
"yh")
setBuildPlatform=AARCH64
# echo "编译aarch64银河........."
;;
"fd")
setBuildPlatform=AMD64
# echo "编译amd64方德........."
;;
"loongarch64")
setBuildPlatform=LOONGARCH64
# echo "编译Loongarch64........."
;;
*)
echo "编译时未指定平台[ fd zx lx yh]......"
exit -1
;;
esac
if [ ! -d $buildDir ];then
mkdir $buildDir
fi
cd $buildDir
echo $QMake $Profilepath
$QMake -r -spec linux-g++ CONFIG+=$setBuildPlatform CONFIG+=OS_UOS -o Makefile $Profilepath
if [ -f "Makefile" ];then
make -j $CPUCoreNum
else
echo "can not build...."$buildDir"/Makefile"" inexistence"
exit -1
fi
}
build_Qt5(){
if [ ! -d $QTSDK ];then
mkdir -p $QTSDK
else
if [ -f $QMake ];then
echo "qmake已存在."
exit 0
fi
fi
Qttmp="qt-everywhere-src-5.12.10"
print_line
if [ ! -d $Qttmp ];then
tar xvf qt-everywhere-src-5.12.10.tar.xz
fi
cd $Qttmp
print_line
make distclean
make confclean
print_line
#针对centos系列,非centos无视之
#注意依赖 libXext-devel fontconfig-devel freetype freetype-devel
#ubuntu
#libXext-dev
echo $QTSDK
which yum
if [ $? -eq 0 ];then
echo "yum=============="
yum install -y libXext-devel fontconfig-devel freetype freetype-devel libxkbcommon-x11-devel libssl-devel
fi
which apt-get
if [ $? -eq 0 ];then
echo "apt-get=============="
apt-get install -y libxext-dev libxtst-dev libfontconfig1-dev libgl1-mesa-dev libglu1-mesa-dev libxext-dev libfreetype6-dev fontconfig-dev libssl-dev libxtst-dev libX11-dev libXext-dev libXtst-dev libxkbcommon-x11-dev build-essential
fi
echo "=======================================by clark============================="
echo "上面yum或者apt-get 安装的是编译界面程序和QT51210必须依赖的重点文件,因为各个平台用的源命令,地址,包名等有所差异,"
echo "例如uos的fontconfig-dev包名是libfontconfig1-dev,在国产化平台更加不懂。所以无法编写统一的策略。"
echo "在重新编译仓库源码,请依据上面包名,在相应的平台上寻找,并确保安装完毕。若有不太熟,请勿重新checkout和目前KSF目录下配置好的QT51210"
echo "xext是X11系列底层ui,缺失qt核心库必崩溃,fontconfig/freetype是界面中文支持依赖,缺失则QT51210的fontconfig模块编译失败,在国产化平台,界面必乱码"
echo "=======================================by clark============================="
release=`cat /etc/redhat-release`
case $release in
"CentOS release 5.4 (Final)")
yum install -y gcc44-c++
echo "centos 5.4............"
./configure -v -prefix $QTSDK -opensource -confirm-license -no-opengl -no-webp -no-sql-mysql -plugin-sql-sqlite -nomake examples -qt-xcb -nomake tests -platform linux-i686-gcc44 -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -qt-harfbuzz -c++std c++11 -skip qtvirtualkeyboard -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtdoc -skip qtmacextras -skip qtmultimedia -skip qtscxml -skip qtlocation -skip qtwayland -skip qtscript -skip qtconnectivity -skip qtdatavis3d -skip qtgamepad -skip qtgraphicaleffects -skip qtpurchasing -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qttools -skip qttranslations -skip qtdeclarative
;;
*)
mach=`uname -m`
echo "mach。。。。"$mach
case $mach in
*"sw"*)
echo "适配申威。。。。"
./configure -v -prefix $QTSDK -opensource -confirm-license -no-opengl -no-webp -no-sql-mysql -plugin-sql-sqlite -nomake examples -nomake tests -qt-xcb -platform linux-g++-sw64 -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -qt-harfbuzz -c++std c++11 -skip qtvirtualkeyboard -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtdoc -skip qtmacextras -skip qtmultimedia -skip qtscxml -skip qtlocation -skip qtwayland -skip qtscript -skip qtconnectivity -skip qtdatavis3d -skip qtgamepad -skip qtgraphicaleffects -skip qtpurchasing -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qttools -skip qttranslations -skip qtdeclarative
#webkit非常耗时的编译,项目暂时用不上
;;
*)
./configure -v -prefix $QTSDK -opensource -confirm-license -no-webp -no-sql-mysql -plugin-sql-sqlite -nomake examples -nomake tests -qtlibinfix ETRUST -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -qt-harfbuzz -c++std c++11 -qt-xcb -skip qtvirtualkeyboard -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtdoc -skip qtmacextras -skip qtmultimedia -skip qtscxml -skip qtlocation -skip qtwayland
没有合适的资源?快使用搜索试试~ 我知道了~
QT5.12.10 不同平台下源码编译方式
共28个文件
gz:10个
sh:7个
xz:4个
需积分: 11 2 下载量 23 浏览量
2022-11-01
13:52:52
上传
评论
收藏 554.25MB ZIP 举报
温馨提示
QT5.12.10 不同平台下源码编译方式
资源推荐
资源详情
资源评论
收起资源包目录
Qt51210.zip (28个子文件)
Qt51210
develop
fcitx
fcitx-qt5-1.2.6.tar.xz 88KB
extra-cmake-modules_5.18.0.orig.tar.xz 278KB
build.sh 213B
extra-cmake-modules_1.4.0.orig.tar.xz 119KB
qt-everywhere-src-5.12.10.tar.xz 486.1MB
deploy_zx_uos.sh 51B
fcitx.tar.gz 485KB
.qmake.cache 0B
deploy_yh_kylinV10Sp1_aarch64.sh 56B
.qmake.stash 739B
deploy_loongarch_uos.sh 60B
third
zlib-1.2.12.tar.gz 1.42MB
libxml2-2.9.4.tar.gz 5.13MB
openssl-1.0.2l.tar.gz 5.12MB
bzip2-latest.tar.gz 791KB
curl-7.51.0.tar.gz-bak 3.32MB
libpng-1.6.37.tar.gz 1.46MB
gzip-1.12.tar.gz 1.23MB
zlib-1.2.11.tar.gz 593KB
curl-7.51.0.tar.gz 3.32MB
third.tar.gz 22.23MB
make_third.sh_bak(old) 5KB
make_third.sh 5KB
deploy_yh_aarch64.sh 53B
build
build.sh_bak(old) 11KB
build.sh 11KB
develop.zip_old_bak 22.71MB
code
release-build
.qmake.stash 739B
共 28 条
- 1
资源评论
ONE米球兔
- 粉丝: 1871
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
- 基于MIC+NE555光敏电阻的声光控电路Multisim仿真原理图
- 基于JSP毕业设计-基于WEB操作系统课程教学网站的设计与实现(源代码+论文).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功