Commit 11b8597688472418c087cfe72792d8940b5c4a26

Authored by kevin_fourie
1 parent 6741e8ee

Merged in from DEV trunk...

KTS-3337?"Text extractors using incorrect Python binary because of config.ini option"?Updated. Added all the extenal binaries.??Committed by: Kevin Fourie?Reviewed by: Conrad Vermeulen


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.2c-Release-Branch@8498 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 81 additions and 4 deletions
lib/util/ktutil.inc
... ... @@ -773,14 +773,64 @@ class KTUtil {
773 773  
774 774 switch ($configCommand)
775 775 {
776   - case 'externalBinary/php':
  776 + case 'externalBinary/xls2cvs':
  777 + if (OS_WINDOWS)
  778 + {
  779 + $script = $stackPath . '/bin/catdoc/xls2csv.exe';
  780 + }
  781 + else
  782 + {
  783 + $script = $stackPath . '/common/bin/xls2csv';
  784 + }
  785 + break;
  786 + case 'externalBinary/pdftotext':;
777 787 if (OS_WINDOWS)
778 788 {
779   - $script = $stackPath . '/php/php.exe';
  789 + $script = $stackPath . '/bin/xpdf/pdftotext.exe';
780 790 }
781 791 else
782 792 {
783   - $script = $stackPath . '/php/bin/php';
  793 + $script = $stackPath . '/common/bin/pdftotext';
  794 + }
  795 + break;
  796 + case 'externalBinary/catppt':
  797 + if (OS_WINDOWS)
  798 + {
  799 + $script = $stackPath . '/bin/catdoc/catppt.exe';
  800 + }
  801 + else
  802 + {
  803 + $script = $stackPath . '/common/bin/catppt';
  804 + }
  805 + break;
  806 + case 'externalBinary/pstotext':
  807 + if (OS_WINDOWS)
  808 + {
  809 + $script = $stackPath . '/bin/pstotext/pstotext.exe';
  810 + }
  811 + else
  812 + {
  813 + $script = $stackPath . '/common/bin/pstotext';
  814 + }
  815 + break;
  816 + case 'externalBinary/catdoc':
  817 + if (OS_WINDOWS)
  818 + {
  819 + $script = $stackPath . '/bin/catdoc/catdoc.exe';
  820 + }
  821 + else
  822 + {
  823 + $script = $stackPath . '/common/bin/catdoc';
  824 + }
  825 + break;
  826 + case 'externalBinary/antiword':
  827 + if (OS_WINDOWS)
  828 + {
  829 + $script = $stackPath . '/bin/antiword/antiword.exe';
  830 + }
  831 + else
  832 + {
  833 + $script = $stackPath . '/common/bin/antiword';
784 834 }
785 835 break;
786 836 case 'externalBinary/python':
... ... @@ -794,7 +844,34 @@ class KTUtil {
794 844 }
795 845 break;
796 846 case 'externalBinary/java':
797   - $script = $stackPath . '/j2re/bin/java';
  847 + if (OS_WINDOWS)
  848 + {
  849 + $script = $stackPath . '/java/jre/bin/java.exe';
  850 + }
  851 + else
  852 + {
  853 + $script = $stackPath . '/java/jre/bin/java';
  854 + }
  855 + break;
  856 + case 'externalBinary/df':
  857 + if (OS_WINDOWS)
  858 + {
  859 + $script = $stackPath . '/bin/gnuwin32/df.exe';
  860 + }
  861 + else
  862 + {
  863 + $script = $stackPath . '/common/bin/df';
  864 + }
  865 + break;
  866 + case 'externalBinary/php':
  867 + if (OS_WINDOWS)
  868 + {
  869 + $script = $stackPath . '/php/php.exe';
  870 + }
  871 + else
  872 + {
  873 + $script = $stackPath . '/php/bin/php';
  874 + }
798 875 break;
799 876 default:
800 877 return null;
... ...