Add new library to urho3d

Hello ! Can you please help. I need to use doboz compressor from under the scripts Urho. Could you please help me integrate the library doboz in Urho. Thank.

You have to read the documentation for CMake, Angelscript, ToLua++ and use the existing CMake scripts and Angelscript/Lua bindings as a guide to follow. Not all libraries are as trivial to add.

  • Place your sources into a folder in the ThirdParty directory
    • ie. ThirdParty/Doboz
  • Add a CMakeLists.txt to that folder, see the CMakeLists.txt in ThirdParty/PugiXml for a trivial one (doboz appears to just be a splat-lib)
  • Add a CMake option into the main CMake scripts
    • they’re mostly found in CMake/Modules/UrhoCommon.cmake
  • If your option is active then include the CMakeLists for your Doboz directory into the build
    • Source/CMakeLists.txt
    • If you set up your Doboz cmakelists appropriately then a Doboz static-lib will be added and properly linked
  • Bind to script
    • done differently for Angelscript / Lua
    • You have to read the docs for each (Angelscript/ToLua++) to decide how you want to bind (or even can bind), for a compression/decompression lib like Doboz you’ll have to go through VectorBuffer.

Note: if you just need compression/decompression LZ4 is already bound to script (at least in Angelscript it is). VectorBuffer CompressVectorBuffer(VectorBuffer&in) so you have to really want to use Doboz for some reason to bother with adding it as a dependency.

1 Like

Oh. Thank! I Think no replies. Urho 1.7 support this compression ?

Reason its I write program to unpack Chaos Rings 3 arhive on my android table. (Using Urho3d I can code on android directly and test, its nice!)