public static async Task LoadAndInitMinerPlugins() { // load dll's and create plugin containers var loadedPlugins = MinerPluginHost.LoadPlugins(Paths.MinerPluginsPath()).Where(uuid => BlacklistedPlugins.IsNotBlacklisted(uuid)); foreach (var pluginUUID in loadedPlugins) { PluginContainer.Create(MinerPluginHost.MinerPlugin[pluginUUID]); } // init all containers foreach (var plugin in PluginContainer.PluginContainers) { if (!plugin.IsInitialized) { plugin.InitPluginContainer(); } if (plugin.Enabled) { plugin.AddAlgorithmsToDevices(); } else { plugin.RemoveAlgorithmsFromDevices(); } } // cross reference local and online list var success = await GetOnlineMinerPlugins(); if (success) { CrossReferenceInstalledWithOnline(); } EthlargementIntegratedPlugin.Instance.ServiceEnabled = MiscSettings.Instance.UseEthlargement && Helpers.IsElevated; Logger.Info("MinerPluginsManager", "Finished initialization of miners."); }
static MinerPluginsManager() { // This is just a list of miners that are intergated in the nhm client. usefull when debuging _integratedPlugins = new List <IMinerPlugin> { // __DEV__* #if INTEGRATE_BrokenMiner_PLUGIN new BrokenMiner.BrokenMinerPlugin(), #endif #if INTEGRATE_ExamplePlugin_PLUGIN new Example.ExamplePlugin(), #endif #if INTEGRATE_FakePlugin_PLUGIN new FakePlugin.FakePlugin(), #endif // real miners #if INTEGRATE_GMiner_PLUGIN new GMinerPlugin.GMinerPlugin(), #endif #if INTEGRATE_NBMiner_PLUGIN new NBMiner.NBMinerPlugin(), #endif #if INTEGRATE_Phoenix_PLUGIN new Phoenix.PhoenixPlugin(), #endif #if INTEGRATE_TeamRedMiner_PLUGIN new TeamRedMiner.TeamRedMinerPlugin(), #endif #if INTEGRATE_TRex_PLUGIN new TRex.TRexPlugin(), #endif #if INTEGRATE_TTMiner_PLUGIN new TTMiner.TTMinerPlugin(), #endif #if INTEGRATE_NanoMiner_PLUGIN new NanoMiner.NanoMinerPlugin(), #endif #if INTEGRATE_WildRig_PLUGIN new WildRig.WildRigPlugin(), #endif #if INTEGRATE_CryptoDredge_PLUGIN new CryptoDredge.CryptoDredgePlugin(), #endif #if INTEGRATE_ZEnemy_PLUGIN new ZEnemy.ZEnemyPlugin(), #endif #if INTEGRATE_LolMiner_PLUGIN new LolMiner.LolMinerPlugin(), #endif #if INTEGRATE_SRBMiner_PLUGIN new SRBMiner.SRBMinerPlugin(), #endif #if INTEGRATE_XMRig_PLUGIN new XMRig.XMRigPlugin(), #endif #if INTEGRATE_MiniZ_PLUGIN new MiniZ.MiniZPlugin(), #endif #if INTEGRATE_ALL_PLUGINS new GMinerPlugin.GMinerPlugin(), new NBMiner.NBMinerPlugin(), new Phoenix.PhoenixPlugin(), new TeamRedMiner.TeamRedMinerPlugin(), new TRex.TRexPlugin(), new TTMiner.TTMinerPlugin(), new NanoMiner.NanoMinerPlugin(), new WildRig.WildRigPlugin(), new CryptoDredge.CryptoDredgePlugin(), new ZEnemy.ZEnemyPlugin(), new LolMiner.LolMinerPlugin(), new SRBMiner.SRBMinerPlugin(), new MiniZ.MiniZPlugin(), #endif // service plugin EthlargementIntegratedPlugin.Instance, // plugin dependencies VC_REDIST_x64_2015_2019_DEPENDENCY_PLUGIN.Instance }; var filteredIntegratedPlugins = _integratedPlugins.Where(p => BlacklistedPlugins.IsNotBlacklisted(p.PluginUUID)).ToList(); foreach (var integratedPlugin in filteredIntegratedPlugins) { PluginContainer.Create(integratedPlugin); } (_initOnlinePlugins, OnlinePlugins) = ReadCachedOnlinePlugins(); }