Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
e3cf83df
Unverified
提交
e3cf83df
authored
11月 03, 2022
作者:
Iñaki Baz Castillo
提交者:
GitHub
11月 03, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Worker: Add `make update-wrap-file` task (#938)
上级
39664072
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
65 行增加
和
29 行删除
+65
-29
Building.md
doc/Building.md
+11
-1
Makefile
worker/Makefile
+45
-20
build.rs
worker/build.rs
+1
-1
libuv.wrap
worker/subprojects/libuv.wrap
+8
-7
没有找到文件。
doc/Building.md
浏览文件 @
e3cf83df
...
@@ -62,7 +62,7 @@ Same as `npm run test:node` but it also opens a browser window with JavaScript c
...
@@ -62,7 +62,7 @@ Same as `npm run test:node` but it also opens a browser window with JavaScript c
The
`worker`
folder contains a
`Makefile`
for the mediasoup-worker C++ subproject. It includes the following tasks:
The
`worker`
folder contains a
`Makefile`
for the mediasoup-worker C++ subproject. It includes the following tasks:
### `make`
### `make`
or `make mediasoup-worker`
Builds the
`mediasoup-worker`
binary at
`worker/out/Release/`
.
Builds the
`mediasoup-worker`
binary at
`worker/out/Release/`
.
...
@@ -118,6 +118,16 @@ Cleans subprojects downloaded with Meson.
...
@@ -118,6 +118,16 @@ Cleans subprojects downloaded with Meson.
Cleans built objects and binaries,
`meson`
and
`ninja`
installed in local prefix with pip and all subprojects downloaded with Meson.
Cleans built objects and binaries,
`meson`
and
`ninja`
installed in local prefix with pip and all subprojects downloaded with Meson.
### `make update-wrap-file`
Update the wrap file of a subproject with Meson. Usage example:
```
bash
$
cd
worker
$
make update-wrap-file
SUBPROJECT
=
openssl
```
### `make xcode`
### `make xcode`
Builds a Xcode project for the mediasoup-worker subproject.
Builds a Xcode project for the mediasoup-worker subproject.
...
...
worker/Makefile
浏览文件 @
e3cf83df
...
@@ -7,11 +7,11 @@ PYTHON ?= $(shell command -v python3 2> /dev/null || echo python)
...
@@ -7,11 +7,11 @@ PYTHON ?= $(shell command -v python3 2> /dev/null || echo python)
ROOT_DIR
:=
$(
shell
dirname
$
(
realpath
$
(
lastword
$(MAKEFILE_LIST))))
ROOT_DIR
:=
$(
shell
dirname
$
(
realpath
$
(
lastword
$(MAKEFILE_LIST))))
CORES
?=
$(
shell
${
ROOT_DIR
}
/scripts/cpu_cores.sh
||
echo
4
)
CORES
?=
$(
shell
${
ROOT_DIR
}
/scripts/cpu_cores.sh
||
echo
4
)
MEDIASOUP_OUT_DIR
?=
$(
shell
pwd
)
/out
MEDIASOUP_OUT_DIR
?=
$(
shell
pwd
)
/out
# Controls build types, `Release` and `Debug` are presets optimized for those
use cases.
# Controls build types, `Release` and `Debug` are presets optimized for those
#
Other build types are possible too, but they are not presets and will require `MESON_ARGS` use to customize buil
d
#
use cases. Other build types are possible too, but they are not presets an
d
# configuration.
#
will require `MESON_ARGS` use to customize build
configuration.
# Check the meaning of useful macros in the `worker/include/Logger.hpp` header
file if you want to enable tracing or
# Check the meaning of useful macros in the `worker/include/Logger.hpp` header
# other debug information.
#
file if you want to enable tracing or
other debug information.
MEDIASOUP_BUILDTYPE
?=
Release
MEDIASOUP_BUILDTYPE
?=
Release
GULP
=
./scripts/node_modules/.bin/gulp
GULP
=
./scripts/node_modules/.bin/gulp
LCOV
=
./deps/lcov/bin/lcov
LCOV
=
./deps/lcov/bin/lcov
...
@@ -21,11 +21,13 @@ INSTALL_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)
...
@@ -21,11 +21,13 @@ INSTALL_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)
BUILD_DIR
?=
$(MEDIASOUP_OUT_DIR)
/
$(MEDIASOUP_BUILDTYPE)
/build
BUILD_DIR
?=
$(MEDIASOUP_OUT_DIR)
/
$(MEDIASOUP_BUILDTYPE)
/build
MESON
?=
$(PIP_DIR)
/bin/meson
MESON
?=
$(PIP_DIR)
/bin/meson
MESON_VERSION
?=
0.61.5
MESON_VERSION
?=
0.61.5
# `MESON_ARGS` can be used to provide extra configuration parameters to Meson, such as adding defines or changing
# `MESON_ARGS` can be used to provide extra configuration parameters to Meson,
# optimization options. For instance, use `MESON_ARGS="-Dms_log_trace=true -Dms_log_file_line=true" npm i` to compile worker with
# such as adding defines or changing optimization options. For instance, use
# tracing and enabled.
# `MESON_ARGS="-Dms_log_trace=true -Dms_log_file_line=true" npm i` to compile
# worker with tracing and enabled.
#
#
# NOTE: On Windows make sure to add `--vsenv` or have MSVS environment already active if you override this parameter.
# NOTE: On Windows make sure to add `--vsenv` or have MSVS environment already
# active if you override this parameter.
MESON_ARGS
?=
""
MESON_ARGS
?=
""
# Workaround for NixOS and Guix that don't work with pre-built binaries, see:
# Workaround for NixOS and Guix that don't work with pre-built binaries, see:
# https://github.com/NixOS/nixpkgs/issues/142383.
# https://github.com/NixOS/nixpkgs/issues/142383.
...
@@ -43,7 +45,8 @@ endif
...
@@ -43,7 +45,8 @@ endif
# Instruct Python where to look for modules it needs, such that `meson` actually
# Instruct Python where to look for modules it needs, such that `meson` actually
# runs from installed location.
# runs from installed location.
# For some reason on Windows adding `:${PYTHONPATH}` breaks things.
#
# NOTE: For some reason on Windows adding `:${PYTHONPATH}` breaks things.
ifeq
($(OS),Windows_NT)
ifeq
($(OS),Windows_NT)
export
PYTHONPATH
:=
$(PIP_DIR)
export
PYTHONPATH
:=
$(PIP_DIR)
else
else
...
@@ -58,18 +61,35 @@ endif
...
@@ -58,18 +61,35 @@ endif
endif
endif
.PHONY
:
\
.PHONY
:
\
default meson-ninja setup clean clean-pip clean-subprojects clean-all mediasoup-worker xcode lint format test tidy
\
default
\
fuzzer fuzzer-run-all docker-build docker-run libmediasoup-worker
meson-ninja
\
setup
\
clean
\
clean-build
\
clean-pip
\
clean-subprojects
\
clean-all
\
update-wrap-file
\
mediasoup-worker
\
libmediasoup-worker
\
xcode
\
lint
\
format
\
test
\
tidy
\
fuzzer
\
fuzzer-run-all
\
docker-build
\
docker-run
default
:
mediasoup-worker
default
:
mediasoup-worker
meson-ninja
:
meson-ninja
:
ifeq
($(wildcard
$(PIP_DIR)),)
ifeq
($(wildcard
$(PIP_DIR)),)
# Updated pip and setuptools are needed for meson
# Updated pip and setuptools are needed for meson
.
# `--system` is not present everywhere and is only needed as workaround for
# `--system` is not present everywhere and is only needed as workaround for
# Debian-specific issue (copied from
# Debian-specific issue (copied from https://github.com/gluster/gstatus/pull/33),
# https://github.com/gluster/gstatus/pull/33), fallback to command without
# fallback to command without `--system` if the first one fails.
# `--system` if the first one fails.
$(PYTHON)
-m
pip
install
--system
--target
=
$(PIP_DIR)
pip setuptools
||
\
$(PYTHON)
-m
pip
install
--system
--target
=
$(PIP_DIR)
pip setuptools
||
\
$(PYTHON)
-m
pip
install
--target
=
$(PIP_DIR)
pip setuptools
||
\
$(PYTHON)
-m
pip
install
--target
=
$(PIP_DIR)
pip setuptools
||
\
echo
"Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
echo
"Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
...
@@ -164,12 +184,21 @@ clean-subprojects: meson-ninja
...
@@ -164,12 +184,21 @@ clean-subprojects: meson-ninja
clean-all
:
clean-subprojects
clean-all
:
clean-subprojects
$(RM)
-rf
$(MEDIASOUP_OUT_DIR)
$(RM)
-rf
$(MEDIASOUP_OUT_DIR)
# Update the wrap file of a subproject. Usage example:
# make update-wrap-file SUBPROJECT=openssl
update-wrap-file
:
meson-ninja
$(MESON)
subprojects update
--reset
$(SUBPROJECT)
mediasoup-worker
:
setup
mediasoup-worker
:
setup
ifeq
($(MEDIASOUP_WORKER_BIN),)
ifeq
($(MEDIASOUP_WORKER_BIN),)
$(MESON)
compile
-C
$(BUILD_DIR)
-j
$(CORES)
mediasoup-worker
$(MESON)
compile
-C
$(BUILD_DIR)
-j
$(CORES)
mediasoup-worker
$(MESON)
install
-C
$(BUILD_DIR)
--no-rebuild
--tags
mediasoup-worker
$(MESON)
install
-C
$(BUILD_DIR)
--no-rebuild
--tags
mediasoup-worker
endif
endif
libmediasoup-worker
:
setup
$(MESON)
compile
-C
$(BUILD_DIR)
-j
$(CORES)
libmediasoup-worker
$(MESON)
install
-C
$(BUILD_DIR)
--no-rebuild
--tags
libmediasoup-worker
xcode
:
setup
xcode
:
setup
$(MESON)
setup
--buildtype
debug
--backend
xcode
$(MEDIASOUP_OUT_DIR)
/xcode
$(MESON)
setup
--buildtype
debug
--backend
xcode
$(MEDIASOUP_OUT_DIR)
/xcode
...
@@ -222,7 +251,3 @@ docker-run:
...
@@ -222,7 +251,3 @@ docker-run:
--cap-add
SYS_PTRACE
\
--cap-add
SYS_PTRACE
\
-v
$(
shell
pwd
)
/../:/mediasoup
\
-v
$(
shell
pwd
)
/../:/mediasoup
\
mediasoup/docker:latest
mediasoup/docker:latest
libmediasoup-worker
:
setup
$(MESON)
compile
-C
$(BUILD_DIR)
-j
$(CORES)
libmediasoup-worker
$(MESON)
install
-C
$(BUILD_DIR)
--no-rebuild
--tags
libmediasoup-worker
worker/build.rs
浏览文件 @
e3cf83df
...
@@ -84,7 +84,7 @@ fn main() {
...
@@ -84,7 +84,7 @@ fn main() {
if
!
Command
::
new
(
"make"
)
if
!
Command
::
new
(
"make"
)
.arg
(
"libmediasoup-worker"
)
.arg
(
"libmediasoup-worker"
)
.env
(
"MEDIASOUP_OUT_DIR"
,
&
mediasoup_out_dir
)
.env
(
"MEDIASOUP_OUT_DIR"
,
&
mediasoup_out_dir
)
.env
(
"MEDIASOUP_BUILDTYPE"
,
&
build_type
)
.env
(
"MEDIASOUP_BUILDTYPE"
,
build_type
)
// Force forward slashes on Windows too, otherwise Meson thinks path is not absolute 🤷
// Force forward slashes on Windows too, otherwise Meson thinks path is not absolute 🤷
.env
(
"INSTALL_DIR"
,
&
out_dir
.replace
(
'\\'
,
"/"
))
.env
(
"INSTALL_DIR"
,
&
out_dir
.replace
(
'\\'
,
"/"
))
.spawn
()
.spawn
()
...
...
worker/subprojects/libuv.wrap
浏览文件 @
e3cf83df
[wrap-file]
[wrap-file]
directory = libuv-v1.44.1
directory = libuv-v1.44.2
source_url = https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1.tar.gz
source_url = https://dist.libuv.org/dist/v1.44.2/libuv-v1.44.2.tar.gz
source_filename = libuv-v1.44.1.tar.gz
source_filename = libuv-v1.44.2.tar.gz
source_hash = 9d37b63430fe3b92a9386b949bebd8f0b4784a39a16964c82c9566247a76f64a
source_hash = ccfcdc968c55673c6526d8270a9c8655a806ea92468afcbcabc2b16040f03cb4
patch_filename = libuv_1.44.1-1_patch.zip
patch_filename = libuv_1.44.2-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libuv_1.44.1-1/get_patch
patch_url = https://wrapdb.mesonbuild.com/v2/libuv_1.44.2-1/get_patch
patch_hash = 8a105158cdabca2a54f1c7cc4c2f814c159271e10dc5e37ed1a08f13cfd67ff7
patch_hash = c77f6104cffd53f697c3030fccbfd5cc684b59772e8f24529b01908ee27bd751
wrapdb_version = 1.44.2-1
[provide]
[provide]
libuv = libuv_dep
libuv = libuv_dep
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论