comparison tools/makeinst-script.sh.in @ 4648:982484a78b75

nsis-installer: check for java using same tests of octave uses (Bug #53572) * tools/makeinst-script.sh.in: check for RuntimeLib using java 8 & java 9 registry positions
author John Donoghue
date Fri, 06 Apr 2018 16:15:00 -0400
parents 4d39ccb64c08
children 1d9448607538
comparison
equal deleted inserted replaced
4647:7eebfda7daa1 4648:982484a78b75
645 cat >> $OUTFILE << EOF 645 cat >> $OUTFILE << EOF
646 646
647 Push \$R0 647 Push \$R0
648 Push \$R1 648 Push \$R1
649 649
650 ; use javaw.exe to avoid dosbox. 650 # get the version
651 ; use java.exe to keep stdout/stderr
652 !define JAVAEXE "javaw.exe"
653
654 ClearErrors 651 ClearErrors
655 ReadEnvStr \$R0 "JAVA_HOME" 652 ReadEnvStr \$R1 "JAVA_VERSION"
656 StrCpy \$R0 "\$R0\\bin\\\${JAVAEXE}" 653 StrCmp \$R1 "" 0 have_java_version
657 IfErrors 0 continue ;; 1) found it in JAVA_HOME
658
659 ClearErrors 654 ClearErrors
655 ReadRegStr \$R1 HKLM "SOFTWARE\\JavaSoft\\JRE" "CurrentVersion"
656 IfErrors 0 have_java_version
660 ReadRegStr \$R1 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment" "CurrentVersion" 657 ReadRegStr \$R1 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment" "CurrentVersion"
661 ReadRegStr \$R0 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment\\\$R1" "JavaHome" 658 IfErrors JRE_Error have_java_version
662 StrCpy \$R0 "\$R0\\bin\\\${JAVAEXE}" 659
663 660 have_java_version:
664 IfErrors 0 continue ;; 2) found it in the registry 661 ClearErrors
665 IfErrors JRE_Error 662 ReadRegStr \$R0 HKLM "SOFTWARE\\JavaSoft\\JRE\\\$R1" "RuntimeLib"
663 IfErrors 0 have_java_runtime
664 ReadRegStr \$R0 HKLM "SOFTWARE\\JavaSoft\\Java Runtime Environment\\\$R1" "RuntimeLib"
665 IfErrors JRE_Error have_java_runtime
666
667 have_java_runtime:
668 # have runtime in R0 - check actual file is there
669 StrCmp \$R0 "" JRE_Error 0
670 ClearErrors
671 IfFileExists \$R0 continue JRE_Error
666 672
667 JRE_Error: 673 JRE_Error:
668 MessageBox MB_ICONEXCLAMATION|MB_YESNO "Octave has the capability to call Java libraries, but the installer was unable to find a Java Runtime Environment (JRE) on this system. Octave will still function without a JRE, only certain specific functions will be disabled. If a JRE is installed later, Octave should be able to detect and use it automatically. Continue with installation?" /SD IDYES IDYES continue 674 MessageBox MB_ICONEXCLAMATION|MB_YESNO "Octave has the capability to call Java libraries, but the installer was unable to find a Java Runtime Environment (JRE) on this system. Octave will still function without a JRE, only certain specific functions will be disabled. If a JRE is installed later, Octave should be able to detect and use it automatically. Continue with installation?" /SD IDYES IDYES continue
669 Abort 675 Abort
670 continue: 676 continue: