Defined in omni/core/OmniInit.h


Initializes the omni library along with Carbonite. Ensures that both libraries will be cleaned up upon exit.

This macro should be used in main(). It creates some objects which will release the framework when they go out of scope.

Use this macro in conjunction with OMNI_APP_GLOBALS().

For startup, this function calls carb::acquireFrameworkAndRegisterBuiltins() and carb::startupFramework(). At a high level, these functions:

  • Determines application path from CLI args and env vars (see carb::extras::getAppPathAndName()).

  • Sets application path as filesystem root.

  • Loads plugins for settings: carb.settings.plugin, carb.dictionary.plugin, carb.tokens.plugins and any serializer plugin.

  • Searches for config file, loads it and applies CLI args overrides.

  • Configures logging with config file.

  • Loads plugins according to config file.

  • Configures default plugins according to config file.

  • Starts the default profiler (if loaded).

  • ... – May be either empty (default initialization), argc, argv (command-line arguments), or a const- reference to a carb::StartupFrameworkDesc.