1 | public File locate() {↵ | | 1 | public File locate() {↵
|
2 | /* If this is a unix-based system, check the 2 best-known areas for the↵ | | 2 | /* If this is a unix-based system, check the 2 best-known areas for the↵
|
3 | * aspell binary.↵ | | 3 | * gpg binary.↵
|
4 | */↵ | | 4 | */↵
|
5 | if (OSInfo.isLinux() || OSInfo.isSolaris()) {↵ | | 5 | if (OSInfo.isLinux() || OSInfo.isSolaris()) {↵
|
6 | if (defaultLinux.exists()) {↵ | | 6 | if (defaultLinux.exists()) {↵
|
7 | return defaultLinux;↵ | | 7 | return defaultLinux;↵
|
8 | } else if (defaultLocalLinux.exists()) {↵ | | 8 | } else if (defaultLocalLinux.exists()) {↵
|
9 | return defaultLocalLinux;↵ | | 9 | return defaultLocalLinux;↵
|
10 | }↵ | | 10 | }↵
|
11 | }↵ | | 11 | }↵
|
|
12 | /* RIYAD: The Prefs API cannot be used to read the Window's registry,↵ | | 12 | /* RIYAD: The Prefs API cannot be used to read the Window's registry,↵
|
13 | * it is coded to use the registry (if available) as a backing store↵ | | 13 | * it is coded to use the registry (if available) as a backing store↵
|
14 | * on in the SOFTWARE/JavaSoft/Prefs registry keys for HKEY_CURRENT_USER↵ | | 14 | * on in the SOFTWARE/JavaSoft/Prefs registry keys for HKEY_CURRENT_USER↵
|
15 | * and HKEY_LOCAL_MACHINE paths. I have seen a few java apps that use↵ | | 15 | * and HKEY_LOCAL_MACHINE paths. I have seen a few java apps that use↵
|
16 | * the Windows registry and they all required a native lib to do it.↵ | | 16 | * the Windows registry and they all required a native lib to do it.↵
|
17 | */↵ | | 17 | */↵
|
18 | /* If this is windows, check the default installation location for the↵ | | 18 | /* If this is windows, check the default installation location for the↵
|
19 | * aspell.exe binary.↵ | | 19 | * gpg.exe binary.↵
|
20 | */↵ | | 20 | */↵
|
21 | if (OSInfo.isWin32Platform() && defaultWin.exists()) {↵ | | 21 | if (OSInfo.isWin32Platform() && defaultWin.exists()) {↵
|
22 | return defaultWin;↵ | | 22 | return defaultWin;↵
|
23 | }↵ | | 23 | }↵
|
|
24 | /* Couldn't find anything, so return null and let the wizard ask the↵ | | 24 | /* Couldn't find anything, so return null and let the wizard ask the↵
|
25 | * user.↵ | | 25 | * user.↵
|
26 | */↵ | | 26 | */↵
|
27 | return null;↵ | | 27 | return null;↵
|
28 | | | 28 |
|