[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - jvmfwk/plugins
Stephan Bergmann
sbergman at redhat.com
Fri May 18 10:54:16 UTC 2018
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 68 ++++++++++++++++-------------
1 file changed, 39 insertions(+), 29 deletions(-)
New commits:
commit 0cb0a99cfd4f2f1a48f9f58ab5ae0a3425afa39c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 15 08:31:49 2018 +0100
Find Java 9 with the new registry keys on Windows
See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37-
4D12-AB10-49F82F720027> section "Windows Registry Key Changes".
Reviewed-on: https://gerrit.libreoffice.org/49792
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7)
Conflicts:
jvmfwk/plugins/sunmajor/pluginlib/util.cxx
Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138
Reviewed-on: https://gerrit.libreoffice.org/54533
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 98883e96c133..c2d7abe0efbd 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -577,35 +577,6 @@ bool decodeOutput(const OString& s, OUString* out)
#if defined(_WIN32)
-void addJavaInfoFromWinReg(
- std::vector<rtl::Reference<VendorBase> > & allInfos,
- std::vector<rtl::Reference<VendorBase> > & addedInfos)
-{
- // Get Java s from registry
- std::vector<OUString> vecJavaHome;
- if(getSDKInfoFromRegistry(vecJavaHome))
- {
- // create impl objects
- typedef std::vector<OUString>::iterator ItHome;
- for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
- ++it_home)
- {
- getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
- }
- }
-
- vecJavaHome.clear();
- if(getJREInfoFromRegistry(vecJavaHome))
- {
- typedef std::vector<OUString>::iterator ItHome;
- for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
- ++it_home)
- {
- getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
- }
- }
-}
-
bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
vector<OUString>& vecJavaHome)
@@ -687,6 +658,45 @@ bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome)
return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
}
+void addJavaInfoFromWinReg(
+ std::vector<rtl::Reference<VendorBase> > & allInfos,
+ std::vector<rtl::Reference<VendorBase> > & addedInfos)
+{
+ // Get Java s from registry
+ std::vector<OUString> vecJavaHome;
+ if(getSDKInfoFromRegistry(vecJavaHome))
+ {
+ // create impl objects
+ for (auto const& javaHome : vecJavaHome)
+ {
+ getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+ }
+ }
+
+ vecJavaHome.clear();
+ if(getJREInfoFromRegistry(vecJavaHome))
+ {
+ for (auto const& javaHome : vecJavaHome)
+ {
+ getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+ }
+ }
+
+ vecJavaHome.clear();
+ if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) {
+ for (auto const & javaHome: vecJavaHome) {
+ getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+ }
+ }
+
+ vecJavaHome.clear();
+ if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JRE", vecJavaHome)) {
+ for (auto const & javaHome: vecJavaHome) {
+ getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+ }
+ }
+}
+
#endif // WNT
void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
More information about the Libreoffice-commits
mailing list