From: Kyle Huckins Date: Mon, 25 Mar 2019 21:21:13 +0000 (+0000) Subject: lp1817932 Remove Java Version Check X-Git-Tag: v0.3.2~13 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6c16504464aac544bfacc2f93083576bceeb6c46;p=Hatch.git lp1817932 Remove Java Version Check - Removes JRE/JDK version checking from the windows installer. Signed-off-by: Kyle Huckins Changes to be committed: modified: installer/windows/hatch.nsi Signed-off-by: Bill Erickson Signed-off-by: Jason Boyer --- diff --git a/installer/windows/hatch.nsi b/installer/windows/hatch.nsi index 06731f3..657591c 100644 --- a/installer/windows/hatch.nsi +++ b/installer/windows/hatch.nsi @@ -60,69 +60,6 @@ ${If} $0 != "admin" ;Require admin rights ${EndIf} !macroend -; Find any installed JRE/JDK and return the version or -1 -Function DetectJava - ; FYI: Because it appears there won't ever be a 64 bit version of makensis for linux - ; this script assumes that it will always be run as part of a 32 bit installer. - ; If that should ever change this script will require some significant adjustment. - - ; 32 bit JRE >= 9 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\JRE" "CurrentVersion" - StrCmp $0 "" +1 Found - - ; 32 bit JDK >= 9 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\JDK" "CurrentVersion" - StrCmp $0 "" +1 Found - - ; 64 bit JRE >= 9 - ${If} ${RunningX64} - SetRegView 64 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\JRE" "CurrentVersion" - SetRegView 32 ; basically SetRegView Default since NSIS only creates 32 bit installers - StrCmp $0 "" +1 Found - ${EndIf} - - ; 64 bit JDK >= 9 - ${If} ${RunningX64} - SetRegView 64 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\JDK" "CurrentVersion" - SetRegView 32 - StrCmp $0 "" +1 Found - ${EndIf} - - ; 32 bit JRE < 9 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" - StrCmp $0 "" +1 Found - - ; 32 bit JDK < 9 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion" - StrCmp $0 "" +1 Found - - ; 64 bit JRE < 9 - ${If} ${RunningX64} - SetRegView 64 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" - SetRegView 32 - StrCmp $0 "" +1 Found - ${EndIf} - - ; 64 bit JDK < 9 - ${If} ${RunningX64} - SetRegView 64 - ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion" - SetRegView 32 - StrCmp $0 "" +1 Found - ${EndIf} - - ; Nuthin. - Push "-1" - Return - - Found: - Push $0 - Return -FunctionEnd - function .onInit setShellVarContext all !insertmacro VerifyUserIsAdmin @@ -132,12 +69,6 @@ functionEnd ;----------------- ;Check our version function ValidateInstall - Call DetectJava - Pop $0 - StrCmp $0 "-1" NoJava - ${If} $0 S< ${JRE_MIN_VERSION} - MessageBox MB_OK "Please update Java to version ${JRE_MIN_VERSION} or higher. Setup will now exit." /SD IDOK IDOK QUIT - ${EndIf} ; Hatch Version Check ReadRegStr $1 HKLM "SOFTWARE\${COMPANYNAME}\${APPNAME}" "Version" StrCmp $1 "" INSTALL @@ -155,8 +86,6 @@ function ValidateInstall ExecWait '"$TEMP\Uninstall ${APPNAME}.exe" /S _?=$1' Delete /REBOOTOK "$TEMP\Uninstall ${APPNAME}.exe" Goto INSTALL - NoJava: - MessageBox MB_OK|MB_ICONSTOP "Java Not Detected. Please install a JRE of version ${JRE_MIN_VERSION} or greater." /SD IDOK QUIT: Quit INSTALL: