private static void SilentExportReleasePackage() { if (!PluginContainer.initialized) { PluginContainer.Initialize(); } SilentPrepareForRelease(); var unitypackagepath = Path.GetFullPath(Path.Combine( Application.dataPath, "..", // Assets "..", // Bolt1.Net4.Release.2018.4 "..", // Projects // we're now at the root of the repo MakePackageName("NET4")) + ".unitypackage"); DoExportRelease(unitypackagepath, true, true); }
public void Initialize() { ISiteService siteService = container.Resolve <ISiteService>(); IPluginEngine pluginEngine = container.Resolve <IPluginEngine>(); PluginTemplateRegistry pluginTemplateRegistry = container.Resolve <PluginTemplateRegistry>(); RouteCollection routes = container.Resolve <RouteCollection>(); PluginScriptRegistry pluginScriptRegistry = container.Resolve <PluginScriptRegistry>(); PluginStyleRegistry pluginStyleRegistry = container.Resolve <PluginStyleRegistry>(); pluginEngine.AutoInitializePlugins = false; // load dynamically compiled assemblies pluginEngine.LoadAssembliesFromCodeFiles("~" + siteService.GetSite().PluginsPath); // load plugins that are in assemblies pluginEngine.LoadPlugins(); // initialize plugins that are installed foreach (Plugin plugin in container.Resolve <IPluginService>().GetPlugins()) { PluginContainer pluginContainer = pluginEngine.GetPlugin(plugin); if (pluginContainer != null) { plugin.Container = pluginContainer; pluginContainer.Tag = plugin; if (pluginContainer.IsLoaded) { pluginContainer.ApplyProperties(plugin.ExtendedProperties); pluginContainer.Initialize(); if (plugin.Enabled) { pluginContainer.RegisterTemplates(pluginTemplateRegistry); pluginContainer.RegisterRoutes(routes); pluginContainer.RegisterScripts(pluginScriptRegistry); pluginContainer.RegisterStyles(pluginStyleRegistry); } } } else { if (!string.IsNullOrEmpty(plugin.VirtualPath)) { pluginContainer = new PluginContainer(new PluginAssemblyContainer(plugin.VirtualPath, (Assembly)null), new PluginFileNotFoundException(plugin.VirtualPath)); } if (pluginContainer != null) { plugin.Container = pluginContainer; pluginContainer.Tag = plugin; pluginEngine.AddPlugin(pluginContainer); } } } container.RegisterInstance(pluginStyleRegistry); container.RegisterInstance(pluginScriptRegistry); container.RegisterInstance(pluginTemplateRegistry); container.RegisterInstance(pluginEngine); }