| 859 | } |
| 860 | |
| 861 | void ScriptEngine::RegisterPlugin(std::string_view path) |
| 862 | { |
| 863 | try |
| 864 | { |
| 865 | auto plugin = std::make_shared<Plugin>(path); |
| 866 | |
| 867 | // We must load the plugin to get the metadata for it |
| 868 | ScriptExecutionInfo::PluginScope scope(_execInfo, plugin, false); |
| 869 | plugin->Load(); |
| 870 | |
| 871 | // Unload the plugin now, metadata is kept |
| 872 | plugin->Unload(); |
| 873 | |
| 874 | LogPluginInfo(plugin, "Registered"); |
| 875 | _plugins.push_back(std::move(plugin)); |
| 876 | } |
| 877 | catch (const std::exception& e) |
| 878 | { |
| 879 | _console.WriteLineError(e.what()); |
| 880 | } |
| 881 | } |
| 882 | |
| 883 | void ScriptEngine::StartIntransientPlugins() |
| 884 | { |
nothing calls this directly
no test coverage detected