Using Runtime Packages

One of Delphi's useful features is its support for "Runtime Packages." By using runtime packages, a Delphi application can be split into several modules. These modules are BPL runtime packages used by the Delphi IDE itself. These packages are special DLLs dynamically loaded into the application's memory space on demand. The size of the main application will be smaller, as any external BPL library will be loaded into memory only when needed. This feature also allows creating modular applications: you can divide your application modules and forms into smaller libraries which can be loaded in your code when they are needed.

uniGUI supports using Runtime Packages and this can be enabled by turning on "Link with runtime packages" in project options. Once this option is set you must make sure all uniGUI runtime packages are in the Runtime packages list.

Below is a list of all runtime packages that are used in a uniGUI application. XX stands for a number that corresponds to your Delphi version. For example, uniGUI25 for Delphi 10.2 Tokyo.

  • uniToolsXX

  • uIndyXX

  • uniGUIXXCore

  • uniGUIXX

  • uniGUIXXChart

  • uniGUIXXmCore

  • uniGUIXXm

For 64-bit applications you need 64-bit versions of BPL files. While you can build them from the IDE manually by changing the target for each runtime BPL, it is more practical to use batch files to generate 64-bit BPL files. See Building 64-bit library files: https://unigui.com/doc/online_help/building-64-bit-library-files.htm

circle-exclamation
clip0104

After enabling runtime packages you will notice that the size of your project executable will be much smaller. For an empty uniGUI project in Release mode, the executable size can be around 43 KB — compared to several megabytes when the project is compiled without runtime packages.