Commit e54426505e302e7a1b0bd3d79eea3ff5c5fbb8d7
Merge branch 'edge' of git@github.com:ktgit/knowledgetree into edge
Showing
3 changed files
with
37 additions
and
25 deletions
dmsctl.sh
| ... | ... | @@ -145,6 +145,7 @@ start_soffice() { |
| 145 | 145 | if [ $RUNNING -eq 1 ]; then |
| 146 | 146 | echo "$0 $ARG: openoffice (pid $SOFFICE_PID) already running" |
| 147 | 147 | else |
| 148 | + if [ -x $SOFFICEBIN ]; then | |
| 148 | 149 | nohup $SOFFICE &> $INSTALL_PATH/var/log/dmsctl.log & |
| 149 | 150 | if [ $? -eq 0 ]; then |
| 150 | 151 | echo "$0 $ARG: openoffice started at port $SOFFICE_PORT" |
| ... | ... | @@ -154,6 +155,10 @@ start_soffice() { |
| 154 | 155 | echo "$0 $ARG: openoffice could not be started" |
| 155 | 156 | ERROR=3 |
| 156 | 157 | fi |
| 158 | + else | |
| 159 | + echo "$0 $ARG: path to openoffice binary ($SOFFICEBIN) could not be found" | |
| 160 | + ERROR=3 | |
| 161 | + fi | |
| 157 | 162 | fi |
| 158 | 163 | } |
| 159 | 164 | ... | ... |
setup/wizard/installUtil.php
| ... | ... | @@ -762,26 +762,6 @@ class InstallUtil { |
| 762 | 762 | return false; |
| 763 | 763 | } |
| 764 | 764 | |
| 765 | - public function useZendJVM() { | |
| 766 | - if($this->util->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 | 765 | public function useZendJava() { |
| 786 | 766 | if($this->installEnvironment() == 'Zend') { |
| 787 | 767 | if(WINDOWS_OS) { // For Zend Installation only | ... | ... |
setup/wizard/lib/services/windowsLucene.php
| ... | ... | @@ -357,13 +357,32 @@ class windowsLucene extends windowsService { |
| 357 | 357 | } elseif (file_exists($this->getJavaBin().DS."bin".DS."server".DS."jvm.dll")) { |
| 358 | 358 | $this->javaJVM = $this->getJavaBin().DS."bin".DS."server".DS."jvm.dll"; |
| 359 | 359 | } else { |
| 360 | - $javaJVM = $this->util->useZendJVM(); | |
| 360 | + $javaJVM = $this->useZendJVM(); | |
| 361 | 361 | if(file_exists($javaJVM)) { |
| 362 | 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 | 387 | * Get Java JVM path |
| 369 | 388 | * |
| ... | ... | @@ -373,7 +392,15 @@ class windowsLucene extends windowsService { |
| 373 | 392 | * @return string |
| 374 | 393 | */ |
| 375 | 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 | 406 | private function writeLuceneInstall($cmd) { |
| ... | ... | @@ -397,7 +424,7 @@ class windowsLucene extends windowsService { |
| 397 | 424 | $luceneExe = $this->getLuceneExe(); |
| 398 | 425 | $luceneSource = $this->getLuceneSource(); |
| 399 | 426 | $luceneDir = $this->getluceneDir(); |
| 400 | - if($luceneExe && $luceneSource && $luceneDir) { | |
| 427 | +// if($luceneExe && $luceneSource && $luceneDir) { | |
| 401 | 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 | 429 | if(DEBUG) { |
| 403 | 430 | echo "$cmd<br/>"; |
| ... | ... | @@ -405,8 +432,8 @@ class windowsLucene extends windowsService { |
| 405 | 432 | } |
| 406 | 433 | $this->writeLuceneInstall($cmd); |
| 407 | 434 | //$response = $this->util->pexec($cmd); |
| 408 | - return $response; | |
| 409 | - } | |
| 435 | +// return $response; | |
| 436 | +// } | |
| 410 | 437 | return $state; |
| 411 | 438 | } |
| 412 | 439 | ... | ... |