changeset 25141:c7de02b5b227

maint: merge stable to default
author Mike Miller <mtmiller@octave.org>
date Fri, 06 Apr 2018 13:34:03 -0700
parents 032eca5275b9 (current diff) ad6dce96cbca (diff)
children ca20eb3d0535
files configure.ac scripts/pkg/pkg.m
diffstat 4 files changed, 32 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Fri Apr 06 11:31:15 2018 -0400
+++ b/configure.ac	Fri Apr 06 13:34:03 2018 -0700
@@ -20,7 +20,8 @@
 
 ### Initialize Autoconf
 AC_PREREQ([2.65])
-AC_INIT([GNU Octave], [4.5.0+], [https://octave.org/bugs.html], [octave])
+AC_INIT([GNU Octave], [4.5.0+], [https://octave.org/bugs.html], [octave],
+        [https://www.gnu.org/software/octave/])
 
 ### Declare version numbers
 
--- a/doc/interpreter/install.txi	Fri Apr 06 11:31:15 2018 -0400
+++ b/doc/interpreter/install.txi	Fri Apr 06 13:34:03 2018 -0700
@@ -312,9 +312,9 @@
 GUI.
 
 @item Qt
-GUI and utility libraries (@url{}).  Qt is required for building the GUI.
-It is a large framework, but the only components required are the GUI,
-core, and network modules.
+GUI and utility libraries (@url{https://www.qt.io}).  Qt is required for
+building the GUI.  It is a large framework, but the only components
+required are the GUI, core, and network modules.
 
 @item SuiteSparse
 Sparse matrix factorization library
--- a/libinterp/octave-value/ov-java.cc	Fri Apr 06 11:31:15 2018 -0400
+++ b/libinterp/octave-value/ov-java.cc	Fri Apr 06 13:34:03 2018 -0700
@@ -547,33 +547,49 @@
   if (! create_vm || ! get_vm)
     {
 #if defined (OCTAVE_USE_WINDOWS_API)
-      // In windows, find the location of the JRE from the registry
+      // In Windows, find the location of the JRE from the registry
       // and load the symbol from the dll.
-      std::string key, value;
-
-      key = R"(software\javasoft\java runtime environment)";
-
-      value = octave::sys::env::getenv ("JAVA_VERSION");
+      std::string key, jversion, value;
+
+      // First search for JRE >= 9
+      key = R"(software\javasoft\jre)";
+
+      jversion = octave::sys::env::getenv ("JAVA_VERSION");
       octave_value regval;
       LONG retval;
-      if (value.empty ())
+      if (jversion.empty ())
         {
           value = "CurrentVersion";
           retval = get_regkey_value (HKEY_LOCAL_MACHINE, key, value, regval);
 
           if (retval != ERROR_SUCCESS)
+            {
+              // Search for JRE < 9
+              key = R"(software\javasoft\java runtime environment)";
+              retval = get_regkey_value (HKEY_LOCAL_MACHINE, key, value,
+                                         regval);
+            }
+
+          if (retval != ERROR_SUCCESS)
             error ("unable to find Java Runtime Environment: %s::%s",
                    key.c_str (), value.c_str ());
 
-          value = regval.xstring_value (
+          jversion = regval.xstring_value (
             "initialize_jvm: registry value \"%s\" at \"%s\" must be a string",
             value.c_str (), key.c_str ());
         }
 
-      key = key + '\\' + value;
+      key = key + '\\' + jversion;
       value = "RuntimeLib";
       retval = get_regkey_value (HKEY_LOCAL_MACHINE, key, value, regval);
       if (retval != ERROR_SUCCESS)
+        {
+          // Search for JRE < 9
+          key = R"(software\javasoft\java runtime environment\)" + jversion;
+          retval = get_regkey_value (HKEY_LOCAL_MACHINE, key, value, regval);
+        }
+
+      if (retval != ERROR_SUCCESS)
         error ("unable to find Java Runtime Environment: %s::%s",
                key.c_str (), value.c_str ());
 
--- a/scripts/pkg/pkg.m	Fri Apr 06 11:31:15 2018 -0400
+++ b/scripts/pkg/pkg.m	Fri Apr 06 13:34:03 2018 -0700
@@ -399,6 +399,7 @@
       endif
 
       local_files = {};
+      tmp_dir = tempname ();
       unwind_protect
 
         if (octave_forge)
@@ -417,7 +418,7 @@
           ## Try to download them.
           external_files_mask = ! cellfun (@exist, files, {"file"});
           if (any (external_files_mask))
-            [success, msg] = mkdir (tmp_dir = tempname ());
+            [success, msg] = mkdir (tmp_dir);
             if (success != 1)
               error ("pkg: failed to create temporary directory: %s", msg);
             endif