Improve Readme.
GitOrigin-RevId: 55d9ac20bde93220befaea33e17519bd0160e9c0
This commit is contained in:
parent
e2a90b9edf
commit
0a735b8c7b
@ -78,15 +78,18 @@ cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ ..
|
|||||||
|
|
||||||
<a name="windows"></a>
|
<a name="windows"></a>
|
||||||
#### Windows
|
#### Windows
|
||||||
|
* Download and install Microsoft Visual Studio 2015 or later.
|
||||||
* Download and install [gperf](https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/). Add the path to gperf.exe to the PATH environment variable.
|
* Download and install [gperf](https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/). Add the path to gperf.exe to the PATH environment variable.
|
||||||
* Install [vcpkg](https://github.com/Microsoft/vcpkg#quick-start).
|
* Install [vcpkg](https://github.com/Microsoft/vcpkg#quick-start).
|
||||||
* Run the following commands to install `TDLib` dependencies using vcpkg:
|
* Run the following commands to install `TDLib` dependencies using vcpkg:
|
||||||
```
|
```
|
||||||
C:\src\vcpkg> .\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
|
cd <path to vcpkg>
|
||||||
|
.\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
|
||||||
```
|
```
|
||||||
|
* Download and install [cmake](https://cmake.org/download/); choose "Add CMake to the system PATH" option while installing.
|
||||||
* Build `TDLib` with CMake as explained in [building](#building), but instead of `cmake -DCMAKE_BUILD_TYPE=Release ..` use
|
* Build `TDLib` with CMake as explained in [building](#building), but instead of `cmake -DCMAKE_BUILD_TYPE=Release ..` use
|
||||||
```
|
```
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=C:\src\vcpkg\scripts\buildsystems\vcpkg.cmake ..
|
cmake -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg>\scripts\buildsystems\vcpkg.cmake ..
|
||||||
```
|
```
|
||||||
|
|
||||||
To build 64-bit `TDLib` using MSVC, you will need to additionally specify parameter `-A x64` to CMake.
|
To build 64-bit `TDLib` using MSVC, you will need to additionally specify parameter `-A x64` to CMake.
|
||||||
|
@ -5,11 +5,12 @@ This is an example of building TDLib with `C++/CLI` support and an example of TD
|
|||||||
## Building TDLib
|
## Building TDLib
|
||||||
|
|
||||||
* Download and install Microsoft Visual Studio 2015 or later.
|
* Download and install Microsoft Visual Studio 2015 or later.
|
||||||
* Download and install [CMake](https://cmake.org/download/).
|
* Download and install [CMake](https://cmake.org/download/); choose "Add CMake to the system PATH" option while installing.
|
||||||
* Install [vcpkg](https://github.com/Microsoft/vcpkg#quick-start) or update it to the latest version using `vcpkg update` and following received instructions.
|
* Install [vcpkg](https://github.com/Microsoft/vcpkg#quick-start) or update it to the latest version using `vcpkg update` and following received instructions.
|
||||||
* Install `zlib` and `openssl` for using `vcpkg`:
|
* Install `zlib` and `openssl` for using `vcpkg`:
|
||||||
```
|
```
|
||||||
C:\src\vcpkg> .\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
|
cd <path to vcpkg>
|
||||||
|
.\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
|
||||||
```
|
```
|
||||||
* (Optional. For XML documentation generation.) Download [PHP](https://windows.php.net/download#php-7.2). Add the path to php.exe to the PATH environment variable.
|
* (Optional. For XML documentation generation.) Download [PHP](https://windows.php.net/download#php-7.2). Add the path to php.exe to the PATH environment variable.
|
||||||
* Download and install [gperf](https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/). Add the path to gperf.exe to the PATH environment variable.
|
* Download and install [gperf](https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/). Add the path to gperf.exe to the PATH environment variable.
|
||||||
@ -18,7 +19,7 @@ C:\src\vcpkg> .\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x
|
|||||||
cd <path to TDLib sources>/example/csharp
|
cd <path to TDLib sources>/example/csharp
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DTD_ENABLE_DOTNET=ON -DCMAKE_TOOLCHAIN_FILE=C:\src\vcpkg\scripts\buildsystems\vcpkg.cmake ../../..
|
cmake -DTD_ENABLE_DOTNET=ON -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg>\scripts\buildsystems\vcpkg.cmake ../../..
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
cmake --build . --config Debug
|
cmake --build . --config Debug
|
||||||
```
|
```
|
||||||
|
@ -9,15 +9,16 @@ This is an example of building TDLib SDK for Universal Windows Platform and an e
|
|||||||
* Install [vcpkg](https://github.com/Microsoft/vcpkg#quick-start) or update it to the latest version using `vcpkg update` and following received instructions.
|
* Install [vcpkg](https://github.com/Microsoft/vcpkg#quick-start) or update it to the latest version using `vcpkg update` and following received instructions.
|
||||||
* Install `zlib` and `openssl` for all UWP architectures using `vcpkg`:
|
* Install `zlib` and `openssl` for all UWP architectures using `vcpkg`:
|
||||||
```
|
```
|
||||||
C:\src\vcpkg> .\vcpkg.exe install openssl:arm-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:x64-uwp zlib:x86-uwp
|
cd <path to vcpkg>
|
||||||
|
.\vcpkg.exe install openssl:arm-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:x64-uwp zlib:x86-uwp
|
||||||
```
|
```
|
||||||
* (Optional. For XML documentation generation.) Download [PHP](https://windows.php.net/download#php-7.2). Add the path to php.exe to the PATH environment variable.
|
* (Optional. For XML documentation generation.) Download [PHP](https://windows.php.net/download#php-7.2). Add the path to php.exe to the PATH environment variable.
|
||||||
* Download and install [gperf](https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/). Add the path to gperf.exe to the PATH environment variable.
|
* Download and install [gperf](https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/). Add the path to gperf.exe to the PATH environment variable.
|
||||||
* Download and install [7-Zip](http://www.7-zip.org/download.html) archiver, which is used by the `build.ps1` script to create a Telegram.Td.UWP Visual Studio Extension. Add the path to 7z.exe to the PATH environment variable.
|
* Download and install [7-Zip](http://www.7-zip.org/download.html) archiver, which is used by the `build.ps1` script to create a Telegram.Td.UWP Visual Studio Extension. Add the path to 7z.exe to the PATH environment variable.
|
||||||
Alternatively `build.ps1` supports compressing using [WinRAR](https://en.wikipedia.org/wiki/WinRAR) with option `-compress winrar` and compressing using [zip](http://gnuwin32.sourceforge.net/packages/zip.htm) with `-compress zip`.
|
Alternatively `build.ps1` supports compressing using [WinRAR](https://en.wikipedia.org/wiki/WinRAR) with option `-compress winrar` and compressing using [zip](http://gnuwin32.sourceforge.net/packages/zip.htm) with `-compress zip`.
|
||||||
* Build `TDLib` using provided `build.ps1` script (TDLib should be built 6 times for multiple platforms in Debug and Release configurations, so it make take few hours). Pass path to vcpkg.exe as `-vcpkg-root` argument:
|
* Build `TDLib` using provided `build.ps1` script (TDLib should be built 6 times for multiple platforms in Debug and Release configurations, so it make take few hours). Pass path to vcpkg.exe as `-vcpkg-root` argument, for example:
|
||||||
```
|
```
|
||||||
powershell -ExecutionPolicy ByPass .\build.ps1 -vcpkg_root C:\src\vcpkg
|
powershell -ExecutionPolicy ByPass .\build.ps1 -vcpkg_root C:\vcpkg
|
||||||
```
|
```
|
||||||
If you need to restart the build from scratch, call `.\build.ps1 -mode clean` first.
|
If you need to restart the build from scratch, call `.\build.ps1 -mode clean` first.
|
||||||
* Install Visual Studio Extension "TDLib for Universal Windows Platform" located at `build-uwp\vsix\tdlib.vsix`, which was created on the previous step by `build.ps1` script.
|
* Install Visual Studio Extension "TDLib for Universal Windows Platform" located at `build-uwp\vsix\tdlib.vsix`, which was created on the previous step by `build.ps1` script.
|
||||||
|
@ -19,7 +19,7 @@ add_custom_target(tdmime_auto DEPENDS ${TDMIME_SOURCE})
|
|||||||
if (NOT CMAKE_CROSSCOMPILING)
|
if (NOT CMAKE_CROSSCOMPILING)
|
||||||
find_program(GPERF_EXECUTABLE gperf)
|
find_program(GPERF_EXECUTABLE gperf)
|
||||||
if (NOT GPERF_EXECUTABLE)
|
if (NOT GPERF_EXECUTABLE)
|
||||||
message(FATAL_ERROR "Could NOT find gperf. Path to gperf needs to be specified manually, i.e. 'cmake -DGPERF_EXECUTABLE:FILEPATH=\"<path to gperf executable>\" .')")
|
message(FATAL_ERROR "Could NOT find gperf. Add path to gperf executable to PATH environment variable or specify it manually using GPERF_EXECUTABLE option, i. e. 'cmake -DGPERF_EXECUTABLE:FILEPATH=\"<path to gperf executable>\"'.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(GPERF_FILES
|
set(GPERF_FILES
|
||||||
|
Loading…
Reference in New Issue
Block a user