openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1825763 - /openoffice/trunk/main/oowintool
Date Sat, 03 Mar 2018 11:06:54 GMT
Author: damjan
Date: Sat Mar  3 11:06:53 2018
New Revision: 1825763

URL: http://svn.apache.org/viewvc?rev=1825763&view=rev
Log:
Add Java 1.9 detection to oowintool.

Patch by: me


Modified:
    openoffice/trunk/main/oowintool

Modified: openoffice/trunk/main/oowintool
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/oowintool?rev=1825763&r1=1825762&r2=1825763&view=diff
==============================================================================
--- openoffice/trunk/main/oowintool (original)
+++ openoffice/trunk/main/oowintool Sat Mar  3 11:06:53 2018
@@ -289,8 +289,16 @@ sub print_jdk_dir()
 	  reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.5/JavaHome")
||
 	  reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.4/JavaHome")
||
 	  reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.3/JavaHome");
-    defined $dir || exit 1;
-    print cygpath($dir, 'w', $output_format); 
+    if (defined $dir) {
+        print cygpath($dir, 'w', $output_format); 
+    } else {
+        # Java 1.9 had to be different:
+        my $currentVersion = reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion");
+        defined $currentVersion || exit 1;
+        my $newDir = reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/" . $currentVersion
. "/JavaHome");
+        defined $newDir || exit 1;
+        print cygpath($newDir, 'w', $output_format);
+    }
 }
 
 sub print_nsis_dir()



Mime
View raw message