Commit 07186889432baaf09c7162b4528bb5c7c0e140e9

Authored by Jarrett Jordaan
1 parent a269bd07

KTS-4494: Updated config_settings table to add python location

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/wizard/steps/database.php
... ... @@ -776,17 +776,6 @@ class database extends Step
776 776 }
777 777  
778 778 private function writeBinaries() {
779   - $services = $this->util->getDataFromSession('services');
780   - $binaries = $services['binaries'];
781   - if($binaries) {
782   - foreach ($binaries as $k=>$bin) {
783   - if($k != 1) {
784   - $updateBin = 'UPDATE config_settings c SET c.value = "'.str_replace('\\', '\\\\', $bin).'" where c.group_name = "externalBinary" and c.display_name = "'.$k.'";';
785   - $this->util->dbUtilities->query($updateBin);
786   - }
787   - }
788   - }
789   -
790 779 // if Windows, attempt to insert full paths to binaries
791 780 if (WINDOWS_OS) {
792 781 $winBinaries = array('php' => 'ZendServer\bin\php.exe', 'python' => 'openoffice\program\python.exe',
... ... @@ -822,7 +811,21 @@ class database extends Step
822 811 // if Linux?
823 812 else {
824 813 // TODO python binary?
825   - // TODO other binaries?
  814 + // Python
  815 + $services = $this->util->getDataFromSession('services');
  816 + $binaries = $services['binaries'];
  817 + $python = "/usr/bin/python";
  818 + if(file_exists($python)) {
  819 + $binaries['python'] = $python;
  820 + }
  821 + if($binaries) {
  822 + foreach ($binaries as $k=>$bin) {
  823 + if($k != 1) {
  824 + $updateBin = 'UPDATE config_settings c SET c.value = "'.str_replace('\\', '\\\\', $bin).'" where c.group_name = "externalBinary" and c.display_name = "'.$k.'";';
  825 + $this->util->dbUtilities->query($updateBin);
  826 + }
  827 + }
  828 + }
826 829 }
827 830 }
828 831  
... ...
setup/wizard/templates/complete.tpl
... ... @@ -25,6 +25,7 @@
25 25 <p class="disclaimer">
26 26 <?php if(WINDOWS_OS) { ?>
27 27 cd KnowledgeTree_Installation_Folder<br/>
  28 + dmsctl.bat install
28 29 dmsctl.bat start
29 30 <?php } else { ?>
30 31 cd /usr/share/knowledgetree-ce<br/>
... ...