example/uwp/README.md
This is an example of building TDLib SDK for Universal Windows Platform and an example of its usage from C#.
zlib and openssl for all UWP architectures and gperf for 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
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 with option -compress winrar and compressing using zip with -compress zip.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:\vcpkg
If you need to restart the build from scratch, call .\build.ps1 -vcpkg_root C:\vcpkg -mode clean first.
build-uwp\vsix\tdlib.vsix, which was created on the previous step by build.ps1 script.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.
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.