diff options
author | George Hazan <george.hazan@gmail.com> | 2023-06-04 19:24:05 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-06-04 19:24:05 +0300 |
commit | efc336e60cf1331bf5f3213d296981b87b8b2a6c (patch) | |
tree | ea59ea1a324f45f6e8a06cc0887b376bfba90ca9 /protocols/Telegram/tdlib/td/example/web/README.md | |
parent | 6e83622d2af1cec3c759f4cff6efe4df2fe3328c (diff) |
fixes #3537 (Telegram: 32-разрядная версия падает в 64-разрядной Windows) + update to the fresh TDLIB
Diffstat (limited to 'protocols/Telegram/tdlib/td/example/web/README.md')
-rw-r--r-- | protocols/Telegram/tdlib/td/example/web/README.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/protocols/Telegram/tdlib/td/example/web/README.md b/protocols/Telegram/tdlib/td/example/web/README.md new file mode 100644 index 0000000000..e903d263a9 --- /dev/null +++ b/protocols/Telegram/tdlib/td/example/web/README.md @@ -0,0 +1,29 @@ +# TDLib Web example + +This is an example of building `TDLib` for browsers using [Emscripten](https://github.com/kripken/emscripten). +These scripts build `TDLib` and create an [NPM](https://www.npmjs.com/) package [tdweb](https://www.npmjs.com/package/tdweb). +You need a Unix shell with `sed`, `tar` and `wget` utilities to run the provided scripts. + +## Building tdweb NPM package + +* Install the 3.1.1 [emsdk](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html), which is known to work. Do not use the system-provided `emscripten` package, because it contains a too old emsdk version. +* Install all `TDLib` build dependencies described in [Building](https://github.com/tdlib/td#building) and `sed`, `tar` and `wget` utilities. +* Run `source ./emsdk_env.sh` from `emsdk` directory to set up the correct build environment. +* On `macOS`, install the `coreutils` [Homebrew](https://brew.sh) package and replace `realpath` in scripts with `grealpath`: +``` +brew install coreutils +sed -i.bak 's/[(]realpath/(grealpath/g' build-tdlib.sh +``` +* Run build scripts in the following order: +``` +cd <path to TDLib sources>/example/web +./build-openssl.sh +./build-tdlib.sh +./copy-tdlib.sh +./build-tdweb.sh +``` +* The built package is now located in the `tdweb` directory. + +## Using tdweb NPM package + +See [tdweb](https://www.npmjs.com/package/tdweb) or [README.md](https://github.com/tdlib/td/tree/master/example/web/tdweb/README.md) for package documentation. |