Ir al final de los metadatos
Ir al inicio de los metadatos

Estás viendo una versión antigua de esta página. Ve a la versión actual.

Comparar con el actual Ver el historial de la página

« Anterior Versión 5 Siguiente »

Since April 2016 TrinityCore supports C++ script reloading while the server is running (without restarting the server).

This tutorial will guide you step by step through the features which the script hotswap system offers.

Enabling the hotswap system

Static linking (default)

Maybe you came in touch already as you read the core setup guide with the SCRIPTS CMake variable which controls the build behaviour of the C++ scripts (the .cpp files you'll find in the src/server/scripts directory).

When you build the scripts statically (SCRIPTS="static") all scripts are compiled into the worldserver, that's why the size of it's executable is huge when building statically. The static build is easy to build and maintain and isn't error prone, but it requires the worldserver to be rebuilt as soon as you edit a script which heavily slows down the fun/ and time working with scripts.

Dynamic linking

Dynamic linking splits the compiled code into multiple shared libraries (.dll on Windows, .so on Linux), which decreases the worldserver executable size but also makes it possible to attach/detach shared libraries while the application is running.

The hotswap system heavily abuses shared library attaching and detaching to hotswap C++ code into the running server without restarting, which heavily speeds up the development time of scripts.

 

  • Sin etiquetas