mediasoup 3.11.9 → 3.11.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,7 +83,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
83
83
  // options
84
84
  {
85
85
  env: {
86
- MEDIASOUP_VERSION: '3.11.9',
86
+ MEDIASOUP_VERSION: '3.11.10',
87
87
  // Let the worker process inherit all environment variables, useful
88
88
  // if a custom and not in the path GCC is used so the user can set
89
89
  // LD_LIBRARY_PATH environment variable for runtime.
@@ -9,7 +9,7 @@ export { types };
9
9
  /**
10
10
  * Expose mediasoup version.
11
11
  */
12
- export declare const version = "3.11.9";
12
+ export declare const version = "3.11.10";
13
13
  /**
14
14
  * Expose parseScalabilityMode() function.
15
15
  */
package/node/lib/index.js CHANGED
@@ -11,7 +11,7 @@ exports.types = types;
11
11
  /**
12
12
  * Expose mediasoup version.
13
13
  */
14
- exports.version = '3.11.9';
14
+ exports.version = '3.11.10';
15
15
  /**
16
16
  * Expose parseScalabilityMode() function.
17
17
  */
package/npm-scripts.js CHANGED
@@ -3,7 +3,7 @@
3
3
  const process = require('process');
4
4
  const os = require('os');
5
5
  const fs = require('fs');
6
- const { execSync } = require('child_process');
6
+ const { execSync, spawnSync } = require('child_process');
7
7
  const { version } = require('./package.json');
8
8
 
9
9
  const isFreeBSD = os.platform() === 'freebsd';
@@ -227,6 +227,21 @@ function buildWorker()
227
227
  {
228
228
  console.log('npm-scripts.js [INFO] buildWorker()');
229
229
 
230
+ if (isWindows)
231
+ {
232
+ if (!fs.existsSync('worker/out/msys/bin/make.exe'))
233
+ {
234
+ installMsysMake();
235
+ }
236
+
237
+ const msysPath = `${process.cwd()}\\worker\\out\\msys\\bin`;
238
+
239
+ if (!process.env['PATH'].includes(msysPath))
240
+ {
241
+ process.env['PATH'] = `${msysPath};${process.env['PATH']}`;
242
+ }
243
+ }
244
+
230
245
  executeCmd(`${MAKE} -C worker`);
231
246
  }
232
247
 
@@ -240,6 +255,11 @@ function cleanWorker()
240
255
  executeCmd(`${MAKE} clean-subprojects -C worker`);
241
256
  // Clean PIP/Meson/Ninja.
242
257
  executeCmd(`${MAKE} clean-pip -C worker`);
258
+
259
+ if (isWindows)
260
+ {
261
+ executeCmd('rd /s /q worker\\out\\msys');
262
+ }
243
263
  }
244
264
 
245
265
  function lintNode()
@@ -323,3 +343,25 @@ function executeCmd(command, exitOnError = true)
323
343
  }
324
344
  }
325
345
  }
346
+
347
+ function installMsysMake()
348
+ {
349
+ console.log('npm-scripts.js [INFO] installMsysMake()');
350
+
351
+ let res = spawnSync('where', [ 'python3.exe' ]);
352
+
353
+ if (res.status !== 0)
354
+ {
355
+ res = spawnSync('where', [ 'python.exe' ]);
356
+
357
+ if (res.status !== 0)
358
+ {
359
+ // eslint-disable-next-line no-console
360
+ console.error('`npm-scripts.js [ERROR] installMsysMake() cannot find Python executable');
361
+
362
+ process.exit(1);
363
+ }
364
+ }
365
+
366
+ executeCmd(`${String(res.stdout).trim()} worker\\scripts\\getmake.py`);
367
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasoup",
3
- "version": "3.11.9",
3
+ "version": "3.11.10",
4
4
  "description": "Cutting Edge WebRTC Video Conferencing",
5
5
  "contributors": [
6
6
  "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
@@ -6,8 +6,9 @@ OS="$(uname -s)"
6
6
  NUM_CORES=
7
7
 
8
8
  case "${OS}" in
9
- Linux*|MINGW*) NUM_CORES=$(nproc);;
9
+ Linux*) NUM_CORES=$(nproc);;
10
10
  Darwin*|FreeBSD) NUM_CORES=$(sysctl -n hw.ncpu);;
11
+ MINGW*) NUM_CORES=$NUMBER_OF_PROCESSORS;;
11
12
  *) NUM_CORES=1;;
12
13
  esac
13
14
 
@@ -0,0 +1,17 @@
1
+ import io, hashlib, tarfile, urllib.request
2
+
3
+ def get(url, digest):
4
+ data = urllib.request.urlopen(url).read()
5
+ assert hashlib.sha256(data).hexdigest() == digest
6
+ tar = tarfile.open(fileobj=io.BytesIO(data))
7
+ tar.extractall('worker/out/msys')
8
+ tar.close()
9
+
10
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.19-1/msysCORE-1.0.19-1-msys-1.0.19-bin.tar.xz/download', '8c4157d739a460f85563bc4451e9f1bbd42b13c4f63770d43b9f45a781f07858')
11
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/libiconv/libiconv-1.14-1/libiconv-1.14-1-msys-1.0.17-dll-2.tar.lzma/download', '196921e8c232259c8e6a6852b9ee8d9ab2d29a91419f0c8dc27ba6f034231683')
12
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/gettext/gettext-0.18.1.1-1/libintl-0.18.1.1-1-msys-1.0.17-dll-8.tar.lzma/download', '29db8c969661c511fbe2a341ab25c993c5f9c555842a75d6ddbcfa70dec16910')
13
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/coreutils/coreutils-5.97-3/coreutils-5.97-3-msys-1.0.13-bin.tar.lzma/download', 'f8c7990416ea16a74ac336dcfe0f596bc46b8724b2d58cf8a3509414220b2366')
14
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/regex/regex-1.20090805-2/libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma/download', '85dd8c1e27a90675c5f867be57ba7ae2bb55dde8cd2d19f284c896be134bd3d1')
15
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/termcap/termcap-0.20050421_1-2/libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma/download', '62b58fe0880f0972fcc84a819265989b02439c1c5185870227bd25f870f7adb6')
16
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/bash/bash-3.1.23-1/bash-3.1.23-1-msys-1.0.18-bin.tar.xz/download', '38da5419969ab883058a96322bb0f51434dd4e9f71de09cd4f75b96750944533')
17
+ get('https://sourceforge.net/projects/mingw/files/MSYS/Base/make/make-3.81-3/make-3.81-3-msys-1.0.13-bin.tar.lzma/download', '847f0cbbf07135801c8e67bf692d29b1821e816ad828753c997fa869a9b89988')