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". Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138 Reviewed-on: https://gerrit.libreoffice.org/49792 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
bf10acd917
commit
cc8e8215c8
@ -569,31 +569,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
|
||||
for (auto const& javaHome : vecJavaHome)
|
||||
{
|
||||
getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
|
||||
}
|
||||
}
|
||||
|
||||
vecJavaHome.clear();
|
||||
if(getJREInfoFromRegistry(vecJavaHome))
|
||||
{
|
||||
for (auto const& javaHome : vecJavaHome)
|
||||
{
|
||||
getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
|
||||
vector<OUString>& vecJavaHome)
|
||||
@ -678,6 +653,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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user