harmony 鸿蒙Obtaining Source Code
Obtaining Source Code
In the Ubuntu environment, perform the following steps to obtain the OpenHarmony source code:
Preparations
Register your account with Gitee.
Register an SSH public key for access to Gitee.
(Skip this step if the tools have been installed.) Install the git client and git-lfs.
Update the software source:
sudo apt-get update
Run the following command to install the tools:
sudo apt-get install git git-lfs
- Configure user information.
git config --global user.name "yourname"
git config --global user.email "your-email-address"
git config --global credential.helper store
- Run the following commands to install the repo tool:
In this example, ~/bin is used as an example installation directory. You can change the directory as needed.
mkdir ~/bin
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o ~/bin/repo
chmod a+x ~/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
- Add the path of the repo tool to environment variables.
vim ~/.bashrc # Edit environment variables.
export PATH=~/bin:$PATH # Add the path of the **repo** tool to the end of environment variables.
source ~/.bashrc # Apply environment variables.
How to Obtain
NOTE
Download the release code, which is more stable, if you want to develop commercial functionalities. Download the master code if you want to get quick access to the latest features for your development.
- Obtaining OpenHarmony release code
For details about how to obtain the source code of an OpenHarmony release, see OpenHarmony Release Notes.
- Obtaining OpenHarmony master code
Method 1 (recommended): Use the repo tool to download the source code over SSH. (You must have registered an SSH public key for access to Gitee.)
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
Method 2: Use the repo tool to download the source code over HTTPS.
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
Running prebuilts
Go to the root directory of the source code and run the following script to install the compiler and binary tool:
bash build/prebuilts_download.sh
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Getting Started with the Standard System with Hi3516 (IDE Mode)
harmony 鸿蒙Getting Started with the Standard System with Hi3516 (CLI Mode)
harmony 鸿蒙Hi3516 Development Board
harmony 鸿蒙Hi3861 Development Board
harmony 鸿蒙RK3568 Development Board
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦