[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - jvmfwk/plugins
Stephan Bergmann
sbergman at redhat.com
Thu Feb 15 20:43:37 UTC 2018
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 72 +++++++++++++++++------------
1 file changed, 43 insertions(+), 29 deletions(-)
New commits:
commit 0963c34dd38bec8c1105c20edecee831ca88fe2d
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/49812
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3c31e60c63e6..f124d6a29dc8 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -576,35 +576,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)
@@ -686,6 +657,49 @@ 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
+ 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);
+ }
+ }
+
+ 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