From cab462ec04a49509ff403998d8bc009e24ac35bd Mon Sep 17 00:00:00 2001 From: wanghao Date: Wed, 8 Nov 2023 16:12:00 +0800 Subject: [PATCH 1/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- README.en.md | 16 ++++++++++++++-- README.md | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/README.en.md b/README.en.md index f9128d3791..16e0e8de43 100644 --- a/README.en.md +++ b/README.en.md @@ -14,8 +14,20 @@ Use the "git diff" command to generate a code patch, and submit the patch to the OpenHarmony - Qt │ └───patch - Source patch folder -│ │ qtbase.patch - qtbase submodule patch -| | qtremoteobjects.patch - qtremoteobjects submodule patch +|____v5.12.12 +│ │ qtbase.patch - qtbase submodule patch +| | qtsensors.patch - qtsensors submodule patch +| | qtdeclarative.patch qtdeclarative submodule patch +| | qtmultimedia.patch - qtmultimedia submodule patch +| | qtconnectivity.patch - qtconnectivity submodule patch +| | qtremoteobjects.patch - qtremoteobjects submodule patch +|____v5.15.11 +│ │ qtbase.patch - qtbase子模块代码补丁 +| | qtsensors.patch - qtsensors子模块补丁 +| | qtdeclarative.patch qtdeclarative子模块补丁 +| | qtmultimedia.patch - qtmultimedia子模块补丁 +| | qtconnectivity.patch - qtconnectivity子模块补丁 +| | qtremoteobjects.patch - qtremoteobjects子模块代码补丁 └───windows_build.bat - windows cross compile script └───linux_build.sh - Linux cross compile script └───LICENSE.FDL - GNU Free Documentation License diff --git a/README.md b/README.md index a55b5f1224..bd1fc515b4 100755 --- a/README.md +++ b/README.md @@ -14,10 +14,20 @@ OpenHarmony - Qt │ └───patch - 源码补丁 -│ │ qtbase.patch - qtbase子模块代码补丁 -| | qtmultimedia.patch - qtmultimedia子模块补丁 -| | qtconnectivity.patch - qtconnectivity子模块补丁 -| | qtremoteobjects.patch - qtremoteobjects子模块代码补丁 +|____v5.12.12 +│ │ qtbase.patch - qtbase子模块代码补丁 +| | qtsensors.patch - qtsensors子模块补丁 +| | qtdeclarative.patch qtdeclarative子模块补丁 +| | qtmultimedia.patch - qtmultimedia子模块补丁 +| | qtconnectivity.patch - qtconnectivity子模块补丁 +| | qtremoteobjects.patch - qtremoteobjects子模块代码补丁 +|____v5.15.11 +│ │ qtbase.patch - qtbase子模块代码补丁 +| | qtsensors.patch - qtsensors子模块补丁 +| | qtdeclarative.patch qtdeclarative子模块补丁 +| | qtmultimedia.patch - qtmultimedia子模块补丁 +| | qtconnectivity.patch - qtconnectivity子模块补丁 +| | qtremoteobjects.patch - qtremoteobjects子模块代码补丁 └───windows_build.bat - windows环境下的交叉编译脚本 └───linux_build.sh - Linux环境下的交叉编译脚本 └───LICENSE.FDL - GNU Free Documentation License -- Gitee From 2d46ef6119e019f89e7979ef10ac4b08a5cfee88 Mon Sep 17 00:00:00 2001 From: wanghao Date: Wed, 8 Nov 2023 20:47:18 +0800 Subject: [PATCH 2/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9README.MD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- README.en.md | 18 +++++++++--------- README.md | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.en.md b/README.en.md index 16e0e8de43..6b34ce088d 100644 --- a/README.en.md +++ b/README.en.md @@ -22,12 +22,12 @@ OpenHarmony - Qt | | qtconnectivity.patch - qtconnectivity submodule patch | | qtremoteobjects.patch - qtremoteobjects submodule patch |____v5.15.11 -│ │ qtbase.patch - qtbase子模块代码补丁 -| | qtsensors.patch - qtsensors子模块补丁 -| | qtdeclarative.patch qtdeclarative子模块补丁 -| | qtmultimedia.patch - qtmultimedia子模块补丁 -| | qtconnectivity.patch - qtconnectivity子模块补丁 -| | qtremoteobjects.patch - qtremoteobjects子模块代码补丁 +│ │ qtbase.patch - qtbase submodule patch +| | qtsensors.patch - qtsensors submodule patch +| | qtdeclarative.patch qtdeclarative submodule patch +| | qtmultimedia.patch - qtmultimedia submodule patch +| | qtconnectivity.patch - qtconnectivity submodule patch +| | qtremoteobjects.patch - qtremoteobjects submodule patch └───windows_build.bat - windows cross compile script └───linux_build.sh - Linux cross compile script └───LICENSE.FDL - GNU Free Documentation License @@ -49,16 +49,16 @@ OpenHarmony - Qt 3. Install Curl tools (sudo apt-get install curl) ### Compilation Steps -1. Execute the linux_build.sh script to complete the qt5 source code, OpenHarmony NDK and code patch application, compilation and installation +1. Execute the linux_build.sh script to complete the qt5 source code, and code patch application, compilation and installation 2. After the script is executed, the installation directory is generated as the bin directory of the current folder ## Windows ### Precondition 1. Install git, if installed skip, download link: https://gitforwindows.org/ 2. Install Perl, if installed skip, download link: https://strawberryperl.com/ -3. Install mingw, if installed skip, download link: https://sourceforge.net/projects/mingw/ +3. Install MinGW-w64, if installed skip, download link: https://sourceforge.net/projects/mingw/ 3. Set the running Path of the above installed program to the Path of the system environment. For example, set the path of ming32-make.exe to the path of the system environment ### Compilation Steps -1. Execute the windows_build.bat script to complete the qt5 source code, OpenHarmony NDK and code patch application, compilation and installation +1. Execute the windows_build.bat script to complete the qt5 source code, and code patch application, compilation and installation 2. After the script is executed, the installation directory is generated as the bin directory of the current folder diff --git a/README.md b/README.md index bd1fc515b4..5384c544e4 100755 --- a/README.md +++ b/README.md @@ -49,18 +49,18 @@ OpenHarmony - Qt 3. 安装Curl工具(sudo apt-get install curl) ### 编译步骤 -1. 执行linux_build.sh脚本,完成qt5源码、OpenHarmony NDK及代码补丁应用和编译安装 +1. 执行linux_build.sh脚本,完成qt5源码、代码补丁应用和编译安装 2. 脚本执行完成后,生成安装目录为当前文件夹的bin目录 ## Windows环境下 ### 前置条件 1. 安装git, 如果已安装则跳过,下载链接:https://gitforwindows.org/ 2. 安装Perl,如果已安装则跳过,下载链接:https://strawberryperl.com/ -3. 安装mingw, 如果已安装则跳过,下载链接:https://sourceforge.net/projects/mingw/ +3. 安装MinGW-w64, 如果已安装则跳过,下载链接:https://sourceforge.net/projects/mingw/ 4. 将以上安装的程序运行路径设置到系统环境Path中,例:把ming32-make.exe的所在路径设置到系统环境Path中 ### 编译步骤 -1. 执行windows_build.bat脚本,完成qt5源码、OpenHarmony NDK及代码补丁应用和编译安装 +1. 执行windows_build.bat脚本,完成qt5源码、代码补丁应用和编译安装 2. 脚本执行完成后,生成安装目录为当前文件夹的bin目录 # Qt For OpenHarmony使用 -- Gitee From fba48ae2dca5a72caeac94fb109279cc03f0ba9d Mon Sep 17 00:00:00 2001 From: wanghao Date: Wed, 8 Nov 2023 20:53:49 +0800 Subject: [PATCH 3/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9README.MD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 6b34ce088d..20f7dbae68 100644 --- a/README.en.md +++ b/README.en.md @@ -56,7 +56,7 @@ OpenHarmony - Qt ### Precondition 1. Install git, if installed skip, download link: https://gitforwindows.org/ 2. Install Perl, if installed skip, download link: https://strawberryperl.com/ -3. Install MinGW-w64, if installed skip, download link: https://sourceforge.net/projects/mingw/ +3. Install compilation tool, if installed skip, download link: https://sourceforge.net/projects/mingw/ 3. Set the running Path of the above installed program to the Path of the system environment. For example, set the path of ming32-make.exe to the path of the system environment ### Compilation Steps diff --git a/README.md b/README.md index 5384c544e4..2f6a219d92 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ OpenHarmony - Qt ### 前置条件 1. 安装git, 如果已安装则跳过,下载链接:https://gitforwindows.org/ 2. 安装Perl,如果已安装则跳过,下载链接:https://strawberryperl.com/ -3. 安装MinGW-w64, 如果已安装则跳过,下载链接:https://sourceforge.net/projects/mingw/ +3. 安装编译工具, 如果已安装则跳过,下载链接:https://sourceforge.net/projects/mingw/ 4. 将以上安装的程序运行路径设置到系统环境Path中,例:把ming32-make.exe的所在路径设置到系统环境Path中 ### 编译步骤 -- Gitee From e9553da1d621b57793cdddeefb421f1322b553fa Mon Sep 17 00:00:00 2001 From: wanghao Date: Wed, 8 Nov 2023 21:13:48 +0800 Subject: [PATCH 4/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9README.MD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 20f7dbae68..37c8b29694 100644 --- a/README.en.md +++ b/README.en.md @@ -56,7 +56,7 @@ OpenHarmony - Qt ### Precondition 1. Install git, if installed skip, download link: https://gitforwindows.org/ 2. Install Perl, if installed skip, download link: https://strawberryperl.com/ -3. Install compilation tool, if installed skip, download link: https://sourceforge.net/projects/mingw/ +3. Install MinGW if installed skip, download link 3. Set the running Path of the above installed program to the Path of the system environment. For example, set the path of ming32-make.exe to the path of the system environment ### Compilation Steps diff --git a/README.md b/README.md index 2f6a219d92..a106625342 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ OpenHarmony - Qt ### 前置条件 1. 安装git, 如果已安装则跳过,下载链接:https://gitforwindows.org/ 2. 安装Perl,如果已安装则跳过,下载链接:https://strawberryperl.com/ -3. 安装编译工具, 如果已安装则跳过,下载链接:https://sourceforge.net/projects/mingw/ +3. 安装MinGW工具, 如果已安装则跳过 4. 将以上安装的程序运行路径设置到系统环境Path中,例:把ming32-make.exe的所在路径设置到系统环境Path中 ### 编译步骤 -- Gitee From af2093756e37a49555487cc306e13c4f2150549f Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 9 Nov 2023 11:04:30 +0800 Subject: [PATCH 5/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9=E4=BA=86README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 37c8b29694..059726d7ae 100644 --- a/README.en.md +++ b/README.en.md @@ -56,7 +56,7 @@ OpenHarmony - Qt ### Precondition 1. Install git, if installed skip, download link: https://gitforwindows.org/ 2. Install Perl, if installed skip, download link: https://strawberryperl.com/ -3. Install MinGW if installed skip, download link +3. Install compilation tool if installed skip, reference linking:https://blog.csdn.net/orangebench11/article/details/126111356 3. Set the running Path of the above installed program to the Path of the system environment. For example, set the path of ming32-make.exe to the path of the system environment ### Compilation Steps diff --git a/README.md b/README.md index a106625342..4b5c218f92 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ OpenHarmony - Qt ### 前置条件 1. 安装git, 如果已安装则跳过,下载链接:https://gitforwindows.org/ 2. 安装Perl,如果已安装则跳过,下载链接:https://strawberryperl.com/ -3. 安装MinGW工具, 如果已安装则跳过 +3. 安装编译工具, 如果已安装则跳过,参考链接:https://blog.csdn.net/orangebench11/article/details/126111356 4. 将以上安装的程序运行路径设置到系统环境Path中,例:把ming32-make.exe的所在路径设置到系统环境Path中 ### 编译步骤 -- Gitee From 275e39342d2e35ee4edf017b7440947330d2b42e Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 9 Nov 2023 14:08:45 +0800 Subject: [PATCH 6/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- linux_build.sh | 15 ++++++++------- windows_build.bat | 27 ++++++++++++++------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/linux_build.sh b/linux_build.sh index da81959098..83a822db09 100755 --- a/linux_build.sh +++ b/linux_build.sh @@ -11,13 +11,14 @@ API10_SDK=http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4 function downloadQtSrc(){ # Download qt5 source code - if [ ! -d $ROOT_DIR/qt5 ] + export QT_SRC_DIR=$ROOT_DIR/${1}_SRC + if [ ! -d $ROOT_DIR/QT_SRC_DIR ] then echo "Download qt5 source code ......" - git clone https://gitee.com/CplusCplus/qt5.git -b $1 --recursive + git clone https://gitee.com/CplusCplus/qt5.git -b $1 --recursive $QT_SRC_DIR else echo "Update qt source code ......" - cd $ROOT_DIR/qt5 + cd $QT_SRC_DIR git clean -fdx git reset --hard @@ -146,7 +147,7 @@ function downloadQtSrcPatch() { function buildQtSrc() { OH_SDK_VERSION="$(echo $(echo "$1" | awk -F '/' '{print $6}') | awk -F '_' '{print $2}')" - BIN_DIR=$ROOT_DIR/qt_${QT_VERSION}_oh_sdk_${OH_SDK_VERSION}_bin/$2 + BIN_DIR=$ROOT_DIR/qt_${2}_oh_sdk_${OH_SDK_VERSION}_bin/$2 if [ "$OHOS_ARCH" == "arm64-v8a" ] then QT_INSTALL_DIR=$BIN_DIR/aarch64-linux-ohos @@ -169,16 +170,16 @@ function buildQtSrc() { mkdir -p $BUILD_DIR fi - chmod +x $ROOT_DIR/qt5 -R + chmod +x $QT_SRC_DIR -R cd $BUILD_DIR if [ "$3" == "10" ]; then - $ROOT_DIR/qt5/configure -xplatform oh-clang -device-option OHOS_ARCH=$OHOS_ARCH -opensource -confirm-license -nomake tests -make examples -v \ + $QT_SRC_DIR/configure -xplatform oh-clang -device-option OHOS_ARCH=$OHOS_ARCH -opensource -confirm-license -nomake tests -make examples -v \ -prefix $QT_INSTALL_DIR -skip doc -skip qtvirtualkeyboard -skip qtnetworkauth -skip qtwebengine -skip qtlocation -skip qtwebchannel \ -skip qtgamepad -skip qtscript -opengl es2 -opengles3 -no-dbus -recheck-all elif if [ "$3" == "9" ] then - $ROOT_DIR/qt5/configure -xplatform oh-clang -device-option OHOS_ARCH=$OHOS_ARCH -opensource -confirm-license -nomake tests -make examples -v \ + $QT_SRC_DIR/configure -xplatform oh-clang -device-option OHOS_ARCH=$OHOS_ARCH -opensource -confirm-license -nomake tests -make examples -v \ -prefix $QT_INSTALL_DIR -skip doc -skip qtconnectivity -skip qtvirtualkeyboard -skip qtnetworkauth -skip qtwebengine -skip qtlocation -skip qtwebchannel \ -skip qtgamepad -skip qtscript -opengl es2 -opengles3 -no-dbus -recheck-all fi diff --git a/windows_build.bat b/windows_build.bat index c922de59a4..ad683a7d66 100644 --- a/windows_build.bat +++ b/windows_build.bat @@ -1,7 +1,7 @@ @echo off set "e=|| exit /b 1" set ROOT_DIR=%cd% -set PATH=%PATH%;%cd% +set PATH=%PATH%;%cd%; set API9_SDK=http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_3.2.10.9/20230225_073754/version-Master_Version-OpenHarmony_3.2.10.9-20230225_073754-ohos-sdk-full.tar.gz set API10_SDK=http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.10.5/20230824_120941/version-Master_Version-OpenHarmony_4.0.10.5-20230824_120941-ohos-sdk-full_monthly.tar.gz @@ -14,9 +14,9 @@ REM goto doneargs :doneargs -REM call :acquireUnzip -REM call :acquireQtSrc -REM call :acquirePatch +call :acquireUnzip +call :acquireQtSrc +call :acquirePatch echo %TARGET_API% if not "%TARGET_API%" == "" ( @@ -74,17 +74,18 @@ pause&exit /b :acquireQtSrc REM <------------------------------download qt5 source------------------------------> -echo %ROOT_DIR% -if not exist "%ROOT_DIR%\qt5" ( - echo "Download qt5 source code ....." - git clone https://gitee.com/CplusCplus/qt5.git -b %QT_VERSION% --recursive - REM cd qt5 +set QT_SRC_DIR=%ROOT_DIR%\%QT_VERSION%_SRC +echo %QT_SRC_DIR% +if not exist "%QT_SRC_DIR%" ( + echo "Download %QT_VERSION% source code ....." + git clone https://gitee.com/CplusCplus/qt5.git -b %QT_VERSION% --recursive %QT_SRC_DIR% + REM cd %QT_SRC_DIR% REM git submodule update --init --recursive REM git checkout origin %QT_VERSION% REM cd %ROOT_DIR% ) else ( echo "Update qt source code ......" - cd qt5 + cd %QT_SRC_DIR% git clean -fdx git reset --hard @@ -266,12 +267,12 @@ if not exist "%BUILD_DIR%" ( echo "BUILD_DIR:%BUILD_DIR%" cd %BUILD_DIR% REM api 9 does not support the bluetooth module -if "%API_VERSION%" == "%API10_SDK%" ( - call %ROOT_DIR%\qt5\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ +if "%TARGET_API%" == "%API10_SDK%" ( + call %ROOT_DIR%\%QT_SRC_DIR%\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ -prefix %QT_INSTALL_DIR% -skip doc -skip qtvirtualkeyboard -skip qtnetworkauth -skip qtwebengine -skip qtlocation -skip qtwebchannel -skip qtgamepad -skip qtscript -opengl es2 ^ -opengles3 -no-dbus -recheck-all ) else ( - call %ROOT_DIR%\qt5\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ + call %ROOT_DIR%\%QT_SRC_DIR%\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ -prefix %QT_INSTALL_DIR% -skip doc -skip qtconnectivity -skip qtvirtualkeyboard -skip qtnetworkauth -skip qtwebengine -skip qtlocation -skip qtwebchannel -skip qtgamepad -skip qtscript -opengl es2 ^ -opengles3 -no-dbus -recheck-all ) -- Gitee From 85ca8c25effcc009d903376271b8f5e9109dfe02 Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 9 Nov 2023 14:17:45 +0800 Subject: [PATCH 7/7] =?UTF-8?q?[mod]=20=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao --- windows_build.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows_build.bat b/windows_build.bat index ad683a7d66..979060fbd8 100644 --- a/windows_build.bat +++ b/windows_build.bat @@ -268,11 +268,11 @@ echo "BUILD_DIR:%BUILD_DIR%" cd %BUILD_DIR% REM api 9 does not support the bluetooth module if "%TARGET_API%" == "%API10_SDK%" ( - call %ROOT_DIR%\%QT_SRC_DIR%\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ + call %QT_SRC_DIR%\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ -prefix %QT_INSTALL_DIR% -skip doc -skip qtvirtualkeyboard -skip qtnetworkauth -skip qtwebengine -skip qtlocation -skip qtwebchannel -skip qtgamepad -skip qtscript -opengl es2 ^ -opengles3 -no-dbus -recheck-all ) else ( - call %ROOT_DIR%\%QT_SRC_DIR%\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ + call %QT_SRC_DIR%\configure.bat -platform win32-g++ -xplatform oh-clang -device-option OHOS_ARCH=%OHOS_ARCH% -opensource -confirm-license -nomake tests -make examples -v ^ -prefix %QT_INSTALL_DIR% -skip doc -skip qtconnectivity -skip qtvirtualkeyboard -skip qtnetworkauth -skip qtwebengine -skip qtlocation -skip qtwebchannel -skip qtgamepad -skip qtscript -opengl es2 ^ -opengles3 -no-dbus -recheck-all ) -- Gitee