jueves, 28 de diciembre de 2023

un poco de humor

 


Enjoy!

Culex

martes, 26 de diciembre de 2023

TDLib & Java example on Windows 10

Although the instructions provide on github are quite completed there were some issues I had to solve myself for doing the example works, so I share here my experience.

Getting the system ready:

  • Download and install Microsoft Visual Studio. Enable C++ support while installing.
  • Download and install CMake; choose "Add CMake to the system PATH" option while installing.
  • Download and install Git.
  • Download and unpack PHP. Add the path to php.exe to the PATH environment variable
  • Download and install JDK.
  • Close and re-open PowerShell if the PATH environment variable was changed

 Building TDLIB Binaries 

  • Run these commands in PowerShell to build TDLib and to install it to td/tdlib:

 Building JNI & Java example

  • Run these commands in PowerShell  but taking into account next remarks

I had to install  gperf manually and  add the path to gperf.exe to the PATH environment variable.

The first cmake  -DCMAKE_BUILD has to be modified as follows (taking into account you path to TDLib sources is D:\TDLib\td)

cmake -A x64 -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=../example/java/td .. -DCMAKE_TOOLCHAIN_FILE=D:/TDLib/td/vcpkg/scripts/buildsystems/vcpkg.cmake

The second  cmake  -DCMAKE_BUILD has to be modified as follows,   

cmake -DCMAKE_BUILD_TYPE=Release -DTd_DIR=D:/TDLib/td/example/java/td/lib/cmake/Td -DCMAKE_INSTALL_PREFIX:PATH=.. ..

Before this last command, I get an error when I run ‘mkdir build’ because the directory already exists but it seems not to be a problem since everything works fine

 


 

Enjoy, 

Culex