Skip to content

Commit c70b054

Browse files
committed
update readme file
1 parent c946b61 commit c70b054

File tree

1 file changed

+66
-68
lines changed

1 file changed

+66
-68
lines changed

README.md

Lines changed: 66 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -10,66 +10,68 @@ At present MRFFToolChain contained OpenSSL、FFmpeg 、libyuv、libopus、libblu
1010

1111
```
1212
├── README.md
13-
├── apple #apple平台通用编译脚本
13+
├── apple #apple平台通用编译脚本
1414
│   ├── compile-any.sh
1515
│   ├── compile-cfgs
1616
│   ├── do-compile
1717
│   └── init-env.sh
18-
├── build #编译目录
19-
│   ├── product #编译产物
20-
│   └── src #构建时源码仓库
21-
├── extra #ffmpeg,openssl 等库的源码
22-
│   ├── bluray
23-
│   ├── dav1d
24-
│   ├── ffmpeg
25-
│   ├── libyuv
26-
│   ├── openssl
27-
│   ├── opus
28-
│   └── patches #打的补丁
29-
├── ffconfig #ffmpeg 功能裁剪配置
18+
├── build #编译目录
19+
│   ├── extra #源码仓库
20+
│   ├── pre #下载的预编译库
21+
│   ├── product #编译产物
22+
│   └── src #构建时源码仓库
23+
├── ffconfig #ffmpeg 功能裁剪配置
3024
│   ├── configure.md
3125
│   ├── module-default.sh
3226
│   ├── module-full.sh
3327
│   ├── module-lite-hevc.sh
3428
│   ├── module-lite.sh
29+
│   ├── module-program.sh
3530
│   └── module.sh -> module-full.sh
36-
├── init-any.sh #初始化源码仓库
37-
├── download-pre.sh #从github下载预编好的库
38-
├── init-cfgs #三方库的配置,包括库名,git仓库地址等信息
31+
├── init-any.sh #初始化源码仓库
32+
├── init-cfgs #三方库的配置,包括库名,git仓库地址等信息
3933
│   ├── bluray
4034
│   ├── dav1d
4135
│   ├── ffmpeg
4236
│   ├── libyuv
4337
│   ├── openssl
4438
│   └── opus
45-
├── ios #ios 平台编译脚本
39+
├── install-pre-any.sh #直接从github下载预编译好的lib
40+
├── ios #ios 平台编译脚本
4641
│   └── compile-any.sh
47-
├── macos #macos 平台编译脚本
42+
├── macos #macos 平台编译脚本
4843
│   └── compile-any.sh
49-
└── tools #初始化仓库依赖的脚本
50-
├── copy-local-repo.sh
51-
├── env_assert.sh
52-
├── init-repo.sh
53-
├── pull-repo-base.sh
54-
└── pull-repo-ref.sh
44+
├── patches #补丁
45+
│   ├── README.md
46+
│   ├── dav1d
47+
│   ├── ffmpeg -> ffmpeg-release-5.1
48+
│   ├── ffmpeg-n4.0
49+
│   └── ffmpeg-release-5.1
50+
├── tools #基础脚本
51+
│   ├── copy-local-repo.sh
52+
│   ├── env_assert.sh
53+
│   ├── init-repo.sh
54+
│   ├── install-pre-lib.sh
55+
│   ├── pull-repo-base.sh
56+
│   └── pull-repo-ref.sh
57+
└── version.sh
5558
```
5659

57-
## Download Precompiled Edition
60+
## Download Pre-compiled libs
5861

5962
可以跳过自己编译,直接从github上下载预编译好的库,节省时间!
60-
预编译库分为 ijk 版和 github 版,其区别是 ijk 版本打了 extra/patches/ffmpeg 目录下的补丁
63+
预编译库已经打了 extra/patches/ 目录下的补丁,调用示例:
6164

62-
- 下载 ijk 版预编译库:./download-pre.sh ijk
63-
- 下载 github 版预编译库:./download-pre.sh github
64-
65-
可指定平台:
65+
```bash
66+
./install-pre-any.sh all
67+
./install-pre-any.sh ios 'libyuv openssl opus bluray dav1d'
68+
./install-pre-any.sh macos 'openssl'
69+
./install-pre-any.sh macos 'openssl ffmpeg'
70+
```
6671

67-
- 下载 ijk 版 iOS 平台的预编译库:./download-pre.sh ijk ios
68-
- 下载 ijk 版 macOS 平台的预编译库:./download-pre.sh ijk macos
69-
- 下载 github 版 iOS 平台的预编译库:./download-pre.sh github ios
70-
- 下载 github 版 macOS 平台的预编译库:./download-pre.sh github macos
72+
## Compile by yourself
7173

72-
## Init Lib Repo
74+
### Init lib repos
7375

7476
脚本参数比较灵活,可根据需要搭配使用,常用方式举例:
7577

@@ -90,80 +92,76 @@ At present MRFFToolChain contained OpenSSL、FFmpeg 、libyuv、libopus、libblu
9092
/init-any.sh all "openssl ffmpeg"
9193
```
9294

93-
高级选项:
94-
95-
设置环境变量 export SKIP_FFMPEG_PATHCHES=1 不打 FFmpeg 补丁;
96-
设置环境变量 export SKIP_PULL_BASE=1 不从远程拉取最新代码;
97-
98-
## Compile
95+
### Compile
9996

10097
根据编译的平台,进入相应的目录,比如编译 macos 平台:
10198

10299
```
103-
cd macos
104100
# 编译 macos arm64 架构下的所有库
105-
./compile-any.sh build all arm64
101+
./macos/compile-any.sh build all arm64
106102
# 编译 macos x86_64 架构下的所有库
107-
./compile-any.sh build all x86_64
103+
./macos/compile-any.sh build all x86_64
108104
# 编译 macos 所有架构下的所有库
109-
./compile-any.sh build all
105+
./macos/compile-any.sh build all
110106
```
111107

112108
编译指定库,比如 openssl,ffmpeg
113109

114110
```
115-
cd macos
116-
# 编译 macos arm64 架构
117-
./compile-any.sh build "openssl ffmpeg" arm64
111+
# 编译 macos arm64 架构 debug 版
112+
./macos/compile-any.sh build "openssl ffmpeg" arm64 debug
118113
# 编译 macos x86_64 架构
119-
./compile-any.sh build "openssl ffmpeg" x86_64
114+
./macos/compile-any.sh build "openssl ffmpeg" x86_64
120115
# 编译 macos 所有架构
121-
./compile-any.sh build "openssl ffmpeg"
116+
./macos/compile-any.sh build "openssl ffmpeg"
122117
```
123118

124119
清理 macos 平台编译产物
125120

126121
```
127-
cd macos
128122
# 清理 macos arm64 架构下的所有库的产物
129-
./compile-any.sh clean all arm64
123+
./macos/compile-any.sh clean all arm64
130124
# 清理 macos x86_64 架构下的所有库的产物
131-
./compile-any.sh clean all x86_64
125+
./macos/compile-any.sh clean all x86_64
132126
# 清理 macos 所有架构下的所有库的产物
133-
./compile-any.sh clean all
127+
./macos/compile-any.sh clean all
134128
```
135129

136130
将 macos 平台编译产物合并成 fat 版本放到 universal 文件夹下(build 所有架构时会自动lipo,只有手动编译不同架构时才会用到 lipo)
137131

138132
```
139-
cd macos
140133
# 合并 macos 所有架构下的所有库的产物
141-
./compile-any.sh lipo all
134+
./macos/compile-any.sh lipo all
142135
# 将 macos arm64 架构下的所有库的产物复制到 universal
143-
./compile-any.sh lipo all arm64
136+
./macos/compile-any.sh lipo all arm64
144137
# 将 macos x86_64 架构下的所有库的产物复制到 universal
145-
./compile-any.sh lipo all x86_64
138+
./macos/compile-any.sh lipo all x86_64
146139
```
147140

148-
编译 ios 平台跟 macos 是一样的流程,只需要 cd 到 ios 目录操作即可
141+
编译 ios 平台跟 macos 是一样的流程,只需要将 macos 改成 ios 即可
149142

150-
实际上 ios 和 macos 均调用了 apple 目录下的脚本。
151-
152-
## Use Your Mirror
143+
### Support Mirror
153144

154145
如果 github 上的仓库克隆较慢,或者需要使用内网私有仓库,可在执行编译脚本前声明对应的环境变量!
155146

156147
| 名称 | 默认仓库 | 使用镜像 |
157148
| --------- | ------------------------------------------------ | -------------------------------------------------- |
158149
| FFmpeg | https://github.com/bilibili/FFmpeg.git | export GIT_FFMPEG_UPSTREAM=git@xx:yy/ffmpeg.git |
159-
| libYUV | https://github.com/lemenkov/libyuv.git | export GIT_FDK_UPSTREAM=git@xx:yy/libyuv.git |
160-
| OpenSSL | https://github.com/openssl/openssl.git | export GIT_OPUS_UPSTREAM=git@xx:yy/openssl.git |
150+
| libYUV | https://github.com/lemenkov/libyuv.git | export GIT_LIBYUV_UPSTREAM=git@xx:yy/libyuv.git |
151+
| OpenSSL | https://github.com/openssl/openssl.git | export GIT_OPENSSL_UPSTREAM=git@xx:yy/openssl.git |
161152
| Opus | https://gitlab.xiph.org/xiph/opus.git | export GIT_OPUS_UPSTREAM=git@xx:yy/opusfile.git |
162153
| libbluray | https://code.videolan.org/videolan/libbluray.git | export GIT_BLURAY_UPSTREAM=git@xx:yy/libbluray.git |
163-
| dav1d | https://code.videolan.org/videolan/dav1d.git | GIT_DAV1D_UPSTREAM=git@xx:yy/dav1d.git |
154+
| dav1d | https://code.videolan.org/videolan/dav1d.git | export GIT_DAV1D_UPSTREAM=git@xx:yy/dav1d.git |
155+
156+
## Advanced Configuration
164157

165-
## Platform Configuration
158+
1、初始化代码仓库时:
159+
160+
```
161+
设置环境变量 export SKIP_FFMPEG_PATHCHES=1 不打 FFmpeg 补丁;
162+
设置环境变量 export SKIP_PULL_BASE=1 不从远程拉取最新代码;
163+
```
166164

167-
1、如果不同的平台需要编译不同的库,只需要在 apple/compile-cfgs 目录下,建立 list_PLAT.txt 文件即可,PLAT 为对应的平台,比如 ios,macos 等;默认情况下按照 list.txt 里声明的顺序编译各个库。
165+
2、如果不同的平台需要编译不同的库,只需要在 apple/compile-cfgs 目录下,建立 list_PLAT.txt 文件即可,PLAT 为对应的平台,比如 ios,macos 等;默认情况下按照 list.txt 里声明的顺序编译各个库。
168166

169-
2、ffmpeg 的配置需要分平台指定,只需要在 ffconfig 目录下创建 module_PLAT.sh 文件即可,PLAT 为对应的平台,比如 ios,macos 等;默认情况下根据 module.sh 声明的配置进行编译 ffmpeg。
167+
3、ffmpeg 的配置需要分平台指定,只需要在 ffconfig 目录下创建 module_PLAT.sh 文件即可,PLAT 为对应的平台,比如 ios,macos 等;默认情况下根据 module.sh 声明的配置进行编译 ffmpeg。

0 commit comments

Comments
 (0)