From: Ben Soares Date: Mon, 6 Jun 2022 13:54:43 +0000 (+0100) Subject: JAL-4020 Added path search for global installation path and older version installatio... X-Git-Tag: Release_2_11_2_6~52^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2c1fabdc3d0b711ebcc844c846fefa61d4e58bd8;p=jalview.git JAL-4020 Added path search for global installation path and older version installation paths --- diff --git a/src/jalview/ext/pymol/PymolManager.java b/src/jalview/ext/pymol/PymolManager.java index 1acce5e..d3b8ece 100644 --- a/src/jalview/ext/pymol/PymolManager.java +++ b/src/jalview/ext/pymol/PymolManager.java @@ -100,19 +100,22 @@ public class PymolManager } else if (os.startsWith("Windows")) { - // todo Windows installation path(s) - for (String root : new String[] - { - String.format("%s\\AppData\\Local", System.getProperty("user.home")), + for (String root : new String[] { + String.format("%s\\AppData\\Local", System.getProperty("user.home")), // default user path + "\\ProgramData", "C:\\ProgramData", // this is the default install path "for everyone" + System.getProperty("user.home"), "\\Program Files", "C:\\Program Files", "\\Program Files (x86)", "C:\\Program Files (x86)" }) { - for (String binary : new String [] {"PyMOLWinWithConsole.bat", "PyMOLWin.exe"}) - { - pathList.add(String.format("%s\\Schrodinger\\PyMOL2\\%s", root, binary)); - } + for (String path : new String [] { + "Schrodinger\\PyMOL2", "PyMOL" }) + { + for (String binary : new String [] {"PyMOLWinWithConsole.bat"}) + { + pathList.add(String.format("%s\\%s\\%s", root, path, binary)); + } + } } - } else if (os.startsWith("Mac")) {