*/
public static List<String> getPymolPaths()
{
+ return getPymolPaths(System.getProperty("os.name"));
+ }
+
+ /**
+ * Returns a list of paths to try for the PyMOL executable. Any user
+ * preference is placed first, otherwise 'standard' paths depending on the
+ * operating system.
+ *
+ * @param os
+ * operating system as reported by environment variable
+ * {@code os.name}
+ * @return
+ */
+ protected static List<String> getPymolPaths(String os)
+ {
List<String> pathList = new ArrayList<>();
String userPath = Cache
.getDefault(Preferences.PYMOL_PATH, null);
if (userPath != null)
{
- pathList.add(0, userPath);
+ pathList.add(userPath);
}
/*
* add default installation paths
*/
String pymol = "PyMOL";
- String os = System.getProperty("os.name");
if (os.startsWith("Linux"))
{
pathList.add("/usr/local/pymol/bin/" + pymol);