Skip to content

Understanding the framework library layout

Stanislav Vasilev edited this page Jan 3, 2023 · 6 revisions

In order to allow for efficient C/C++ plugin support and distribution on platforms like Linux, the framework uses a specific build system and library layout.

There are 3 binaries:

  1. The framework library
  2. The application library
  3. The application executable

The framework library

The framework library is the code that the framework provides which includes all modules and wrappers around them. For personal usage you can customize the build system to disable module at compile time. This can also be useful if compiling as a static application instead of a full library. Disabling features at compile time is also an OK thing to do on platforms like Windows

On Linux and other Unix-like systems where libraries are included globally the global framework library shall be installed and be compiled with the complete module feature set, as to not result in breakages of software using the library

The application library

The application library contains all code for the application built on top of the framework, this includes all code under Source/

In general creating a C API as part of the application library is advised in cases where you might want to add modding/plugin support to it

The application executable

The application executable is a simple executable that is created automatically by the UVKBuildTool, its entire job is to load the application and framework libraries and any mods/plugins that are provided using the standardized plugin interface under a uvproj.yaml file

Static compilation and notes for Windows

In general if you don't want to add modding and want a completely self contained application, you can completely compile the libraries as static ones, this way instead of 3 binaries you get only 1

On Windows, it's advisable you compile statically if you don't want mod support. If you want mod support you can additionally compile your application in "2 in 1 mode" which compiles the application and framework libraries into a single library, or you can go the Unix route and compile all 3 binaries as specified above

Clone this wiki locally