From 2c1fabdc3d0b711ebcc844c846fefa61d4e58bd8 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 6 Jun 2022 14:54:43 +0100 Subject: [PATCH] JAL-4020 Added path search for global installation path and older version installation paths --- src/jalview/ext/pymol/PymolManager.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) 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")) { -- 1.7.10.2