1 下载代码
环境
- macOS Catalina 10.15.7, brew, pip/pip3, python/python3
下载方法
- https://www.openharmony.cn/download
cd ~/Development/Gitee
mkdir ./bin
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o ./bin/repo
chmod a x ./bin/repo
export PATH=$PATH:./bin # 配置到环境变量中
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
mkdir ./openharmony_master
cd ./openharmony_master
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
下载成功
- repo sync 耗时约 30 分钟,下载完成后代码文件夹总共 24.41 GB
问题记录
- repo init 出错
- 反复提示 "No module named requests" 错误,以下链接方法解决问题:
https://stackoverflow.com/questions/17309288/importerror-no-module-named-requests
代码语言:shell复制python3 -m pip install requests
- repo sync -c 出错
git-lfs: command not found
- 以下链接方法解决问题:
https://stackoverflow.com/questions/67395259/git-clone-git-lfs-filter-process-git-lfs-command-not-found
代码语言:shell复制brew install git-lfs
git lfs install
2 构建版本
执行 prebuilts
- 在源码根目录下执行prebuilts脚本,安装编译器及二进制工具
bash build/prebuilts_download.sh
构建
代码语言:shell复制cd ./build/build_scripts/
./env_setup.sh
./build.sh
- Mac系统貌似不支持,后续再研究下
问题记录
- prebuilts_download 出错
ERROR: Could not find a version that satisfies the requirement rich (from versions: none)
ERROR: No matching distribution found for rich
- 解决
python3 -m pip install rich
3 提交代码
(待补充)