Commit 4fa013069ed5a9e51add3251c2a3d3497a87497a
1 parent
339f0433
Some more paths
Committed by: Jarrett Jordaan Reviewed by: Prince Mbekwa
Showing
2 changed files
with
32 additions
and
25 deletions
setup/wizard/installUtil.php
| @@ -762,26 +762,6 @@ class InstallUtil { | @@ -762,26 +762,6 @@ class InstallUtil { | ||
| 762 | return false; | 762 | return false; |
| 763 | } | 763 | } |
| 764 | 764 | ||
| 765 | - public function useZendJVM() { | ||
| 766 | - if($this->installEnvironment() == 'Zend') { | ||
| 767 | - if(WINDOWS_OS) { // For Zend Installation only | ||
| 768 | - $sysdir = explode(DS, SYSTEM_DIR); | ||
| 769 | - array_pop($sysdir); | ||
| 770 | - array_pop($sysdir); | ||
| 771 | - array_pop($sysdir); | ||
| 772 | - $zendsys = ''; | ||
| 773 | - foreach ($sysdir as $v) { | ||
| 774 | - $zendsys .= $v.DS; | ||
| 775 | - } | ||
| 776 | - $jvm = $zendsys."jre".DS."bin".DS."client".DS."jvm.dll"; | ||
| 777 | - if(file_exists($jvm)) | ||
| 778 | - return $jvm; | ||
| 779 | - } | ||
| 780 | - } | ||
| 781 | - | ||
| 782 | - return false; | ||
| 783 | - } | ||
| 784 | - | ||
| 785 | public function useZendJava() { | 765 | public function useZendJava() { |
| 786 | if($this->installEnvironment() == 'Zend') { | 766 | if($this->installEnvironment() == 'Zend') { |
| 787 | if(WINDOWS_OS) { // For Zend Installation only | 767 | if(WINDOWS_OS) { // For Zend Installation only |
setup/wizard/lib/services/windowsLucene.php
| @@ -357,13 +357,32 @@ class windowsLucene extends windowsService { | @@ -357,13 +357,32 @@ class windowsLucene extends windowsService { | ||
| 357 | } elseif (file_exists($this->getJavaBin().DS."bin".DS."server".DS."jvm.dll")) { | 357 | } elseif (file_exists($this->getJavaBin().DS."bin".DS."server".DS."jvm.dll")) { |
| 358 | $this->javaJVM = $this->getJavaBin().DS."bin".DS."server".DS."jvm.dll"; | 358 | $this->javaJVM = $this->getJavaBin().DS."bin".DS."server".DS."jvm.dll"; |
| 359 | } else { | 359 | } else { |
| 360 | - $javaJVM = $this->util->useZendJVM(); | 360 | + $javaJVM = $this->useZendJVM(); |
| 361 | if(file_exists($javaJVM)) { | 361 | if(file_exists($javaJVM)) { |
| 362 | $this->javaJVM = $javaJVM; | 362 | $this->javaJVM = $javaJVM; |
| 363 | } | 363 | } |
| 364 | } | 364 | } |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | + public function useZendJVM() { | ||
| 368 | + if($this->util->installEnvironment() == 'Zend') { | ||
| 369 | + if(WINDOWS_OS) { // For Zend Installation only | ||
| 370 | + $sysdir = explode(DS, SYSTEM_DIR); | ||
| 371 | + array_pop($sysdir); | ||
| 372 | + array_pop($sysdir); | ||
| 373 | + array_pop($sysdir); | ||
| 374 | + $zendsys = ''; | ||
| 375 | + foreach ($sysdir as $v) { | ||
| 376 | + $zendsys .= $v.DS; | ||
| 377 | + } | ||
| 378 | + $jvm = $zendsys."jre".DS."bin".DS."client".DS."jvm.dll"; | ||
| 379 | + if(file_exists($jvm)) | ||
| 380 | + return $jvm; | ||
| 381 | + } | ||
| 382 | + } | ||
| 383 | + | ||
| 384 | + return false; | ||
| 385 | + } | ||
| 367 | /** | 386 | /** |
| 368 | * Get Java JVM path | 387 | * Get Java JVM path |
| 369 | * | 388 | * |
| @@ -373,7 +392,15 @@ class windowsLucene extends windowsService { | @@ -373,7 +392,15 @@ class windowsLucene extends windowsService { | ||
| 373 | * @return string | 392 | * @return string |
| 374 | */ | 393 | */ |
| 375 | public function getJavaJVM() { | 394 | public function getJavaJVM() { |
| 376 | - return $this->javaJVM; | 395 | + $path1 = "C:\Program Files\Zend\ktdms\java\jre\bin\client\jvm.dll"; |
| 396 | + $path2 = "C:\Program Files (x86)\Zend\ktdms\java\jre\bin\client\jvm.dll"; | ||
| 397 | + if(file_exists($path1)) { | ||
| 398 | + return $path1; | ||
| 399 | + } else if(file_exists($path2)) { | ||
| 400 | + return $path2; | ||
| 401 | + } | ||
| 402 | + // Hard code | ||
| 403 | + //return $this->javaJVM; | ||
| 377 | } | 404 | } |
| 378 | 405 | ||
| 379 | private function writeLuceneInstall($cmd) { | 406 | private function writeLuceneInstall($cmd) { |
| @@ -397,7 +424,7 @@ class windowsLucene extends windowsService { | @@ -397,7 +424,7 @@ class windowsLucene extends windowsService { | ||
| 397 | $luceneExe = $this->getLuceneExe(); | 424 | $luceneExe = $this->getLuceneExe(); |
| 398 | $luceneSource = $this->getLuceneSource(); | 425 | $luceneSource = $this->getLuceneSource(); |
| 399 | $luceneDir = $this->getluceneDir(); | 426 | $luceneDir = $this->getluceneDir(); |
| 400 | - if($luceneExe && $luceneSource && $luceneDir) { | 427 | +// if($luceneExe && $luceneSource && $luceneDir) { |
| 401 | $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto"; | 428 | $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto"; |
| 402 | if(DEBUG) { | 429 | if(DEBUG) { |
| 403 | echo "$cmd<br/>"; | 430 | echo "$cmd<br/>"; |
| @@ -405,8 +432,8 @@ class windowsLucene extends windowsService { | @@ -405,8 +432,8 @@ class windowsLucene extends windowsService { | ||
| 405 | } | 432 | } |
| 406 | $this->writeLuceneInstall($cmd); | 433 | $this->writeLuceneInstall($cmd); |
| 407 | //$response = $this->util->pexec($cmd); | 434 | //$response = $this->util->pexec($cmd); |
| 408 | - return $response; | ||
| 409 | - } | 435 | +// return $response; |
| 436 | +// } | ||
| 410 | return $state; | 437 | return $state; |
| 411 | } | 438 | } |
| 412 | 439 |