Qt for OpenHarmony: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
Line 48: Line 48:


[[File:Git-address.png|1069x1069px]]
[[File:Git-address.png|1069x1069px]]
=Building Qt Library for Qt for OpenHarmony in macOS=
=== Pre-requirements ===
Following instruction has been prepared based on macOS Sonoma 14.0.  Does not represent a minimum dependency condition.
* git version 2.39.3
* python 3.12.0
=== System environments ===
Open ''~/.zshrc'' or ''~/.bashrc'' and add the following:
<code>local HARMONY_OS_API_VER=12
local HOME_LIBRARY=${HOME}/Library
export OHOS_SDK_ROOT=${HOME_LIBRARY}/OpenHarmony/Sdk
export HOS_SDK_HOME=${HOME_LIBRARY}/OpenHarmony/Sdk
export OHOS_SDK_12=${HOS_SDK_HOME}/${HARMONY_OS_API_VER}
export NATIVE_OHOS_SDK=${OHOS_SDK_12}/native</code>

Revision as of 06:53, 10 September 2024

OpenHarmony Introduction

OpenHarmony is an open-source project incubated and operated by the OpenAtom Foundation, with the goal of building a framework and platform for intelligent terminal device operating systems. It aims to cater to the era of full-scenario, full-connectivity, and full-intelligence, and promote the prosperous development of the Internet of Everything industry.

OpenHarmony Open source project

HUAWEI DevEco Studio Installation

If you want to develop Qt for OpenHarmony applications, apart from using Qt Creator, you also need to rely on DevEco Studio.

https://developer.huawei.com/consumer/cn/deveco-studio/

For OpenHarmony 5, you need to install API Version 12:

DevEco_Studio_Preferences

To avoid any issues caused by the development environment, please first confirm if you can use DevEco Studio to develop Arkts applications.

Gerrit Introduction

The Qt source code is hosted on Gerrit for code review and version control. All needed information about how to work with Gerrit is written on the following pages:

How to get Qt for OpenHarmony source code

  1. Access and login to: https://codereview.qt-project.org.
  2. Click on the "Settings" in the upper right corner to open the settings page.
  3. Click on "Settings" -> "HTTP Credentials" -> "GENERATE NEW PASSWORD" to generate a new password. Save the password for later use with "git clone".
  4. Access https://codereview.qt-project.org/admin/repos/qt/tqtc-qt5, and copy the git repository address.
Codereview-settings.png





GENERATE-NEW-PASSWORD.png








Git-address.png

Building Qt Library for Qt for OpenHarmony in macOS

Pre-requirements

Following instruction has been prepared based on macOS Sonoma 14.0. Does not represent a minimum dependency condition.

  • git version 2.39.3
  • python 3.12.0

System environments

Open ~/.zshrc or ~/.bashrc and add the following:

<code>local HARMONY_OS_API_VER=12 local HOME_LIBRARY=${HOME}/Library export OHOS_SDK_ROOT=${HOME_LIBRARY}/OpenHarmony/Sdk export HOS_SDK_HOME=${HOME_LIBRARY}/OpenHarmony/Sdk export OHOS_SDK_12=${HOS_SDK_HOME}/${HARMONY_OS_API_VER} export NATIVE_OHOS_SDK=${OHOS_SDK_12}/native</code>