public List <string> GetMissingMasterFiles(string pluginPath) { string gameDataPath = GameService.DataPath; string exePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string fullPluginPath = Path.Combine(exePath, pluginPath); string str = ModDump.DumpMasters(fullPluginPath); List <string> masterFileNames = str.ToString().Split(';').Where(x => !string.IsNullOrEmpty(x)).ToList(); return(masterFileNames.FindAll(fileName => !File.Exists(Path.Combine(gameDataPath, fileName)))); }
public PluginDump AnalyzePlugin(string pluginFileName) { _backgroundWorker.ReportMessage("Analyzing " + pluginFileName + "...\n", true); ModDump.DumpPlugin(pluginFileName); ModDump.RaiseLastModDumpError(); // throw exception if dump json is empty string json = ModDump.GetDumpResult(); if (json.Length < 3) { throw new Exception("Failed to analyze plugin " + pluginFileName); } // deserialize and return plugin dump return(JsonConvert.DeserializeObject <PluginDump>(json.ToString())); }