- Timestamp:
- 02/11/10 13:41:52 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManager.cs
r2778 r2779 105 105 StringBuilder builder = new StringBuilder(); 106 106 builder.AppendLine("Problem report:"); 107 var missingFiles = from x in desc.Files 108 where !File.Exists(x.Name) 109 select x.Name; 110 if (missingFiles.Count() > 0) { 111 foreach (string fileName in from file in desc.Files select file.Name) { 112 if (!File.Exists(fileName)) builder.Append("Missing file: ").AppendLine(fileName); 113 } 114 return builder.ToString(); 115 } else { 116 // or any dependency is disabled 117 var disabledDependencies = from x in desc.Dependencies 118 where x.PluginState == PluginState.Disabled 119 select x; 120 if (disabledDependencies.Count() > 0) { 121 foreach (var dependency in disabledDependencies) { 122 builder.Append(dependency.Name).AppendLine(" is disabled.").AppendLine(DetermineProblem(dependency)); 123 } 124 return builder.ToString(); 125 } else { 126 // or any dependency is missing / not installed 127 var declaredDependencies = GetDeclaredDependencies(desc); 128 if (declaredDependencies.Count() != desc.Dependencies.Count()) { 129 var missingDependencies = from x in declaredDependencies 130 where !desc.Dependencies.Any(dep => dep.Name == x) 131 select x; 132 builder.AppendLine("Necessary dependencies are missing:"); 133 foreach (string missingDependency in missingDependencies) { 134 builder.AppendLine(missingDependency); 135 } 136 } else { 137 // or there was a problem loading the assemblies 138 builder.AppendLine("There was a problem while loading assemblies: "); 139 foreach (string assemblyLocation in desc.AssemblyLocations) { 140 builder.AppendLine(assemblyLocation + ": " + AssemblyName.GetAssemblyName(assemblyLocation).FullName); 141 } 142 return builder.ToString(); 143 } 144 } 145 } 146 return "There is an unknown problem with plugin: " + desc.Name; 107 builder.AppendLine(desc.LoadingErrorInformation); 108 return builder.ToString(); 147 109 } 148 110
Note: See TracChangeset
for help on using the changeset viewer.