FORGE KUI / docs

Deployment, CRT and runtime libraries

The C++ DLL ABI uses STL types.

Version 3.61.7

How to use it

The C++ DLL ABI uses STL types. Match Release /MD with the Release core and Debug /MDd with the Debug core. If a Debug consumer intentionally uses /MD, set Kui_USE_DEBUG_VARIANT OFF before find_package.

Integration and limits

Use kui_copy_runtime_dlls and test in a clean directory or on the target machine. Include fonts, images, pages, extension sidecars and media DLLs rather than copying only the executable. Check missing libraries, architecture and CRT mismatches before first use.

A standalone CMake consumer

The course project consumes an installed SDK through find_package(Kui), independently of the engine source tree. Pages are embedded during configuration, and the SDK helper copies runtime libraries.

cmake
cmake_minimum_required(VERSION 3.20)
project(forge_kui_settings_lab LANGUAGES CXX)
if(NOT CMAKE_CXX_STANDARD)
  message(FATAL_ERROR "Set CMAKE_CXX_STANDARD to match the selected SDK package.")
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(MSVC)
  add_compile_options(/utf-8)
endif()
find_package(Kui 3 REQUIRED)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/app.css" APP_CSS)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/settings.zh.html" APP_HTML_ZH)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/settings.en.html" APP_HTML_EN)
string(REPLACE "<!-- APP_CSS -->" "<style>${APP_CSS}</style>" APP_HTML_ZH "${APP_HTML_ZH}")
string(REPLACE "<!-- APP_CSS -->" "<style>${APP_CSS}</style>" APP_HTML_EN "${APP_HTML_EN}")
configure_file(page.h.in generated_page.h @ONLY)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS app.css settings.zh.html settings.en.html)
add_executable(settings_lab main.cpp)
target_include_directories(settings_lab PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(settings_lab PRIVATE Kui::Kui)
kui_copy_runtime_dlls(settings_lab)
include(CTest)
if(BUILD_TESTING)
  add_executable(settings_state_test settings_state_test.cpp)
  add_test(NAME settings_state COMMAND settings_state_test)
endif()

Turn a build output into a deliverable

Validate local Release output, then validate a copied, standalone folder.

  1. Build and run kui_copy_runtime_dlls, including dependencies for selected components.
  2. Copy the executable, matching DLLs, resources and sidecars together.
  3. Launch outside the project folder and check image, font, page and extension paths.
  4. Check startup and key actions without relying on a developer PATH.
  5. Keep version, dependency and checksum records; choose a separate location for user data.

Keep Debug and Release consistent

Debug normally selects the Debug-CRT runtime. If your Debug application must use the Release CRT, configure Kui_USE_DEBUG_VARIANT OFF before find_package as documented and match the consumer CRT too. Random DLL replacement is not a reliable ABI fix.