Commit bad2a2f5915cd1aa90105a0761d35d62e5cbcf07

Authored by kevin_fourie
1 parent d517ca3a

KTS-3048

"External Dependencies missing after upgrade"
In Progess. Updated the upgrade config functions.

Committed By: Kevin Fourie
Reviewed By: Conrad Vermeulen

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8091 c91229c3-7414-0410-bfa2-8a42b809f60b
config/dmsDefaults.php
... ... @@ -76,6 +76,16 @@ if (!defined('KT_LIB_DIR')) {
76 76 define('KT_LIB_DIR', KT_DIR . '/lib');
77 77 }
78 78  
  79 +// If not defined, set KT_INSTALL_DIR based on my usual location in the tree
  80 +if (!defined('KT_INSTALL_DIR')) {
  81 + $installLoc = realpath(dirname(__FILE__) . '/../..');
  82 + if (substr(PHP_OS, 0, 3) == 'WIN') {
  83 + $installLoc = str_replace('\\','/',$rootLoc);
  84 + }
  85 + define('KT_INSTALL_DIR', $installLoc);
  86 +}
  87 +
  88 +
79 89 // PATH_SEPARATOR added in PHP 4.3.0
80 90 if (!defined('PATH_SEPARATOR')) {
81 91 if (substr(PHP_OS, 0, 3) == 'WIN') {
... ...
lib/upgrades/UpgradeFunctions.inc.php
... ... @@ -1038,17 +1038,18 @@ class UpgradeFunctions {
1038 1038 $ini->addItem('webservice', 'validateSessionCount', 'false');
1039 1039  
1040 1040 // externalBinary Section
  1041 + $ini->delSection('externalBinary');
1041 1042 if(OS_WINDOWS){
1042   - $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.');
1043   - $ini->addItem('externalBinary', 'pdftotext', 'pdftotext');
1044   - $ini->addItem('externalBinary', 'catppt', 'catppt');
1045   - $ini->addItem('externalBinary', 'pstotext', 'pstotext');
1046   - $ini->addItem('externalBinary', 'catdoc', 'catdoc');
1047   - $ini->addItem('externalBinary', 'antiword', 'antiword.exe');
1048   - $ini->addItem('externalBinary', 'python', 'python.bat');
1049   - $ini->addItem('externalBinary', 'java', 'java.exe');
1050   - $ini->addItem('externalBinary', 'php', 'php.exe');
1051   - $ini->addItem('externalBinary', 'df', 'df.exe');
  1043 + $ini->addItem('externalBinary', 'xls2csv', KT_INSTALL_DIR . '/bin/catdoc/xls2csv.exe', '', 'The following are external binaries that may be used by various parts of knowledgeTree.');
  1044 + $ini->addItem('externalBinary', 'pdftotext', KT_INSTALL_DIR . '/bin/xpdf/pdftotext.exe');
  1045 + $ini->addItem('externalBinary', 'catppt', KT_INSTALL_DIR . '/bin/catdoc/catppt.exe');
  1046 + $ini->addItem('externalBinary', 'pstotext', KT_INSTALL_DIR . '/pstotext');
  1047 + $ini->addItem('externalBinary', 'catdoc', KT_INSTALL_DIR . '/bin/catdoc/catdoc.exe');
  1048 + $ini->addItem('externalBinary', 'antiword', KT_INSTALL_DIR . '/bin/antiword/antiword.exe');
  1049 + $ini->addItem('externalBinary', 'python', KT_INSTALL_DIR . '/python.bat');
  1050 + $ini->addItem('externalBinary', 'java', KT_INSTALL_DIR . '/java/jre/bin/java.exe');
  1051 + $ini->addItem('externalBinary', 'php', KT_INSTALL_DIR . '/php/php.exe');
  1052 + $ini->addItem('externalBinary', 'df', KT_INSTALL_DIR . '/bin/gnuwin32/df.exe');
1052 1053  
1053 1054 } else {
1054 1055 $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.');
... ... @@ -1056,7 +1057,7 @@ class UpgradeFunctions {
1056 1057 $ini->addItem('externalBinary', 'catppt', 'catppt');
1057 1058 $ini->addItem('externalBinary', 'pstotext', 'pstotext');
1058 1059 $ini->addItem('externalBinary', 'catdoc', 'catdoc');
1059   - $ini->addItem('externalBinary', 'antiword', 'antiword.exe');
  1060 + $ini->addItem('externalBinary', 'antiword', '');
1060 1061 $ini->addItem('externalBinary', 'python', 'python');
1061 1062 $ini->addItem('externalBinary', 'java', 'java');
1062 1063 $ini->addItem('externalBinary', 'php', 'php');
... ...