import org.slf4j.LoggerFactory;
import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.gui.Preferences;
import jalview.util.FileUtils;
import jalview.util.Platform;
else if (Platform.isWin())
{
Set<File> installedChimera = new HashSet<>();
- String[] templates = new String[] { "%s\\%s %s\\bin\\%s" };
+ String[] templates = new String[] { "%s\\%s %s\\bin\\%s.exe" };
String[] roots = new String[] { "\\Program Files",
"C:\\Program Files", "\\Program Files (x86)",
"C:\\Program Files (x86)", String.format("%s\\AppData\\Local",
System.getProperty("user.home")) };
+ Console.debug("Starting search for " + chimera);
for (String root : roots)
{
+ Console.debug("Looking under '" + root + "'");
for (String template : templates)
{
+ Console.debug("Using template '" + template + "'");
String globMatch = String.format(template, root, chimera, "*",
chimeraExe);
+ Console.debug("Looking for installed versions of " + chimera
+ + " using '" + globMatch + "'");
List<File> foundInstalls = FileUtils.getFilesFromGlob(globMatch,
false);
for (File found : foundInstalls)
{
+ Console.debug("Checking " + found.getPath() + " is okay");
boolean add = true;
for (String notVersion : versionsBlacklist)
{
}
if (add)
{
+ Console.debug("Adding " + found.getPath());
installedChimera.add(found);
}
+ else
+ {
+ Console.debug(
+ "Not adding " + found.getPath() + ", not valid");
+ }
}
}
// try without a version number too