tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-5 tomcat.nsi
Date Tue, 14 Sep 2004 07:59:41 GMT
mturk       2004/09/14 00:59:41

  Modified:    .        tomcat.nsi
  Log:
  Fix function findJVMPath. It failed to set the custom jre path if the
  path was not JDK path. Now that we can use only JRE, enable that.
  The JRE paths does not have 'jre\bin\', but just 'bin\' prefix.
  Also add checking for client (Not sure if we still need the hotspot and classic).
  Think they've been used on older JVM's we cannot use anyhow.
  
  Revision  Changes    Path
  1.61      +29 -27    jakarta-tomcat-5/tomcat.nsi
  
  Index: tomcat.nsi
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- tomcat.nsi	13 Sep 2004 19:11:41 -0000	1.60
  +++ tomcat.nsi	14 Sep 2004 07:59:41 -0000	1.61
  @@ -151,7 +151,6 @@
     !insertmacro MUI_INSTALLOPTIONS_READ $2 "jvm.ini" "Field 2" "State"
   
     StrCpy "$JavaHome" $2
  -  Push $2
     Call findJVMPath
     Pop $2
   
  @@ -183,7 +182,6 @@
     !insertmacro MUI_INSTALLOPTIONS_READ $2 "jvm.ini" "Field 2" "State"
   
     StrCpy "$JavaHome" $2
  -  Push $2
     Call findJVMPath
     Pop $2
   
  @@ -387,37 +385,42 @@
   ;
   Function findJVMPath
   
  -  Pop $1
  -
  -  IfFileExists "$1\jre\bin\hotspot\jvm.dll" 0 TryJDK14
  -    StrCpy $2 "$1\jre\bin\hotspot\jvm.dll"
  -    Goto EndIfFileExists
  -  TryJDK14:
  -  IfFileExists "$1\jre\bin\server\jvm.dll" 0 TryClassic
  -    StrCpy $2 "$1\jre\bin\server\jvm.dll"
  -    Goto EndIfFileExists
  -  TryClassic:
  -  IfFileExists "$1\jre\bin\classic\jvm.dll" 0 JDKNotFound
  -    StrCpy $2 "$1\jre\bin\classic\jvm.dll"
  -    Goto EndIfFileExists
  -  JDKNotFound:
  -    SetErrors
  -  EndIfFileExists:
  +  ClearErrors
  +  
  +  ;Step one: Is this a JRE path (Program Files\Java\XXX)
  +  StrCpy $1 "$JavaHome"
  +  
  +  StrCpy $2 "$1\bin\hotspot\jvm.dll"
  +  IfFileExists "$2" FoundJvmDll
  +  StrCpy $2 "$1\bin\server\jvm.dll"
  +  IfFileExists "$2" FoundJvmDll
  +  StrCpy $2 "$1\bin\client\jvm.dll"  
  +  IfFileExists "$2" FoundJvmDll
  +  StrCpy $2 "$1\bin\classic\jvm.dll"
  +  IfFileExists "$2" FoundJvmDll
   
  -  IfErrors 0 FoundJVMPath
  +  ;Step two: Is this a JDK path (Program Files\XXX\jre)
  +  StrCpy $1 "$JavaHome\jre"
  +  
  +  StrCpy $2 "$1\bin\hotspot\jvm.dll"
  +  IfFileExists "$2" FoundJvmDll
  +  StrCpy $2 "$1\bin\server\jvm.dll"
  +  IfFileExists "$2" FoundJvmDll
  +  StrCpy $2 "$1\bin\client\jvm.dll"  
  +  IfFileExists "$2" FoundJvmDll
  +  StrCpy $2 "$1\bin\classic\jvm.dll"
  +  IfFileExists "$2" FoundJvmDll
   
     ClearErrors
  -
  +  ;Step tree: Read defaults from registry
  +  
     ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
     ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$1" "RuntimeLib"
     
  -  FoundJVMPath:
  -
  -  IfErrors 0 NoErrors
  +  IfErrors 0 FoundJvmDll
     StrCpy $2 ""
   
  -NoErrors:
  -
  +  FoundJvmDll:
     ClearErrors
   
     ; Put the result in the stack
  @@ -438,7 +441,6 @@
     Quit
   NoErrors1:
     StrCpy "$JavaHome" $3
  -  Push $3
     Call findJVMPath
     Pop $4
     StrCmp $4 "" 0 NoErrors2
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message