Buckets:
1.06 GB
1,825 files
Updated about 2 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| app | 19 items | ||
| LICENSE_1_0.txt | 1.34 kB xet | 6524d7f7 | |
| README.md | 2.53 kB xet | a3a612f6 | |
| SDKManifest.xml | 470 Bytes xet | 08e80c0c | |
| Telegram.Td.UWP.nuspec | 810 Bytes xet | 41ecb0b2 | |
| Telegram.Td.UWP.targets | 1.33 kB xet | a66bb93a | |
| [Content_Types].xml | 849 Bytes xet | b3c672aa | |
| build.ps1 | 4.83 kB xet | a2b584c8 | |
| extension.vsixmanifest | 927 Bytes xet | 3814652b |
TDLib Universal Windows Platform example
This is an example of building TDLib SDK for Universal Windows Platform and an example of its usage from C#.
Building SDK
- Download and install Microsoft Visual Studio 2017+ with Windows 10 SDK. We recommend to use the latest available versions of Microsoft Visual Studio and Windows 10 SDK.
- Download and install CMake. CMake 3.13 or newer is required.
- Install
zlibandopensslfor all UWP architectures andgperffor x86 using vcpkg:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git checkout bc3512a509f9d29b37346a7e7e929f9a26e66c7e
.\bootstrap-vcpkg.bat
.\vcpkg.exe install gperf:x86-windows openssl:arm-uwp openssl:arm64-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:arm64-uwp zlib:x64-uwp zlib:x86-uwp
- (Optional. For XML documentation generation.) Download PHP. Add the path to php.exe to the PATH environment variable.
- Download and install 7-Zip archiver, which is used by the
build.ps1script to create a Telegram.Td.UWP Visual Studio Extension. Add the path to 7z.exe to the PATH environment variable. Alternativelybuild.ps1supports compressing using WinRAR with option-compress winrarand compressing using zip with-compress zip. - Build
TDLibusing providedbuild.ps1script (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-rootargument, for example:
powershell -ExecutionPolicy ByPass .\build.ps1 -vcpkg_root C:\vcpkg
If you need to restart the build from scratch, call .\build.ps1 -vcpkg_root C:\vcpkg -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 bybuild.ps1script.
After this TDLib can be used from any UWP project, built in Visual Studio.
Alternatively, you can build TDLib as a NuGet package, adding the option -nupkg to the .\build.ps1 script invocation. The resulting package will be placed in the directory build-uwp\nupkg.
Example of usage
The app/ directory contains a simple example of a C# application for Universal Windows Platform. Just open it with Visual Studio 2015 or later and run.
- Total size
- 1.06 GB
- Files
- 1,825
- Last updated
- Sep 19
- Pre-warmed CDN
- US EU US EU