From bad2a2f5915cd1aa90105a0761d35d62e5cbcf07 Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Tue, 19 Feb 2008 10:21:08 +0000 Subject: [PATCH] KTS-3048 "External Dependencies missing after upgrade" In Progess. Updated the upgrade config functions. --- config/dmsDefaults.php | 10 ++++++++++ lib/upgrades/UpgradeFunctions.inc.php | 23 ++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index 0556027..7e57993 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -76,6 +76,16 @@ if (!defined('KT_LIB_DIR')) { define('KT_LIB_DIR', KT_DIR . '/lib'); } +// If not defined, set KT_INSTALL_DIR based on my usual location in the tree +if (!defined('KT_INSTALL_DIR')) { + $installLoc = realpath(dirname(__FILE__) . '/../..'); + if (substr(PHP_OS, 0, 3) == 'WIN') { + $installLoc = str_replace('\\','/',$rootLoc); + } + define('KT_INSTALL_DIR', $installLoc); +} + + // PATH_SEPARATOR added in PHP 4.3.0 if (!defined('PATH_SEPARATOR')) { if (substr(PHP_OS, 0, 3) == 'WIN') { diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php index cb0b904..0b4aab0 100644 --- a/lib/upgrades/UpgradeFunctions.inc.php +++ b/lib/upgrades/UpgradeFunctions.inc.php @@ -1038,17 +1038,18 @@ class UpgradeFunctions { $ini->addItem('webservice', 'validateSessionCount', 'false'); // externalBinary Section + $ini->delSection('externalBinary'); if(OS_WINDOWS){ - $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); - $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); - $ini->addItem('externalBinary', 'catppt', 'catppt'); - $ini->addItem('externalBinary', 'pstotext', 'pstotext'); - $ini->addItem('externalBinary', 'catdoc', 'catdoc'); - $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); - $ini->addItem('externalBinary', 'python', 'python.bat'); - $ini->addItem('externalBinary', 'java', 'java.exe'); - $ini->addItem('externalBinary', 'php', 'php.exe'); - $ini->addItem('externalBinary', 'df', 'df.exe'); + $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.'); + $ini->addItem('externalBinary', 'pdftotext', KT_INSTALL_DIR . '/bin/xpdf/pdftotext.exe'); + $ini->addItem('externalBinary', 'catppt', KT_INSTALL_DIR . '/bin/catdoc/catppt.exe'); + $ini->addItem('externalBinary', 'pstotext', KT_INSTALL_DIR . '/pstotext'); + $ini->addItem('externalBinary', 'catdoc', KT_INSTALL_DIR . '/bin/catdoc/catdoc.exe'); + $ini->addItem('externalBinary', 'antiword', KT_INSTALL_DIR . '/bin/antiword/antiword.exe'); + $ini->addItem('externalBinary', 'python', KT_INSTALL_DIR . '/python.bat'); + $ini->addItem('externalBinary', 'java', KT_INSTALL_DIR . '/java/jre/bin/java.exe'); + $ini->addItem('externalBinary', 'php', KT_INSTALL_DIR . '/php/php.exe'); + $ini->addItem('externalBinary', 'df', KT_INSTALL_DIR . '/bin/gnuwin32/df.exe'); } else { $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 { $ini->addItem('externalBinary', 'catppt', 'catppt'); $ini->addItem('externalBinary', 'pstotext', 'pstotext'); $ini->addItem('externalBinary', 'catdoc', 'catdoc'); - $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); + $ini->addItem('externalBinary', 'antiword', ''); $ini->addItem('externalBinary', 'python', 'python'); $ini->addItem('externalBinary', 'java', 'java'); $ini->addItem('externalBinary', 'php', 'php'); -- libgit2 0.21.4