You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Building.md
+49-21
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,12 @@ Compiles mediasoup TypeScript code (`lib` folder) JavaScript and places it into
17
17
18
18
Compiles mediasoup TypeScript code (`lib` folder) JavaScript, places it into the `lib` directory an watches for changes in the TypeScript files.
19
19
20
+
21
+
### `npm run worker:build`
22
+
23
+
Builds the `mediasoup-worker` binary. It invokes `make`below.
24
+
25
+
20
26
### `npm run lint`
21
27
22
28
Runs both `npm run lint:node` and `npm run lint:worker`.
@@ -57,41 +63,30 @@ Runs [Catch2](https://github.com/catchorg/Catch2) test units located at `worker/
57
63
Same as `npm run test:node` but it also opens a browser window with JavaScript coverage results.
58
64
59
65
60
-
##Makefile
66
+
### `npm run install-deps:node`
61
67
62
-
The `worker` folder contains a `Makefile` for the mediasoup-worker C++ subproject. It includes the following tasks:
68
+
Installs NPM dependencies and updates `package-lock.json`.
63
69
64
70
65
-
### `make` or `make mediasoup-worker`
71
+
### `npm run install-clang-tools`
66
72
67
-
Builds the `mediasoup-worker` binary at `worker/out/Release/`.
73
+
Installs clang tools needed for local development.
68
74
69
-
If the "MEDIASOUP_MAX_CORES" environment variable is set, the build process will use that number of CPU cores. Otherwise it will auto-detect the number of cores in the machine.
70
75
71
-
"MEDIASOUP_BUILDTYPE" environment variable controls build types, `Release` and `Debug` are presets optimized for those use cases.
72
-
Other build types are possible too, but they are not presets and will require "MESON_ARGS" use to customize build configuration.
73
-
Check the meaning of useful macros in the `worker/include/Logger.hpp` header file if you want to enable tracing or other debug information.
74
-
75
-
Binary is built at `worker/out/MEDIASOUP_BUILDTYPE/build`.
76
+
## Makefile
76
77
77
-
In order to instruct the mediasoup Node.js module to use the `Debug`mediasoup-worker binary, an environment variable must be set before running the Node.js application:
78
+
The `worker` folder contains a `Makefile` for the mediasoup-worker C++ subproject. It includes the following tasks:
78
79
79
-
```bash
80
-
$ MEDIASOUP_BUILDTYPE=Debug node myapp.js
81
-
```
82
80
83
-
If the "MEDIASOUP_WORKER_BIN" environment variable is set, mediasoup will use the it as mediasoup-worker binary and **won't** compile the binary:
Builds the `libmediasoup-worker` static library at `worker/out/Release/`.
88
+
Installs `meson` and `ninja`.
93
89
94
-
`MEDIASOUP_MAX_CORES` and `MEDIASOUP_BUILDTYPE` environment variables from above still apply for static library build.
95
90
96
91
### `make clean`
97
92
@@ -128,6 +123,39 @@ $ make update-wrap-file SUBPROJECT=openssl
128
123
```
129
124
130
125
126
+
### `make mediasoup-worker`
127
+
128
+
Builds the `mediasoup-worker` binary at `worker/out/Release/`.
129
+
130
+
If the "MEDIASOUP_MAX_CORES" environment variable is set, the build process will use that number of CPU cores. Otherwise it will auto-detect the number of cores in the machine.
131
+
132
+
"MEDIASOUP_BUILDTYPE" environment variable controls build types, `Release` and `Debug` are presets optimized for those use cases.
133
+
Other build types are possible too, but they are not presets and will require "MESON_ARGS" use to customize build configuration.
134
+
Check the meaning of useful macros in the `worker/include/Logger.hpp` header file if you want to enable tracing or other debug information.
135
+
136
+
Binary is built at `worker/out/MEDIASOUP_BUILDTYPE/build`.
137
+
138
+
In order to instruct the mediasoup Node.js module to use the `Debug` mediasoup-worker binary, an environment variable must be set before running the Node.js application:
139
+
140
+
```bash
141
+
$ MEDIASOUP_BUILDTYPE=Debug node myapp.js
142
+
```
143
+
144
+
If the "MEDIASOUP_WORKER_BIN" environment variable is set, mediasoup will use the it as mediasoup-worker binary and **won't** compile the binary:
0 commit comments