diff --git a/dmsctl.bat b/dmsctl.bat
index 7137907..139a750 100644
--- a/dmsctl.bat
+++ b/dmsctl.bat
@@ -31,6 +31,7 @@ echo start - start the services
echo stop - stop the services
echo restart - restart the services
echo.
+echo install - install the services
echo uninstall - uninstall the services
echo.
@@ -63,4 +64,11 @@ sc delete %SchedulerServiceName%
sc delete %OpenofficeServiceName%
goto end
+:install
+echo Installing services
+call "%INSTALL_PATH%\var\bin\officeinstall.bat"
+call "%INSTALL_PATH%\var\bin\schedulerinstall.bat"
+call "%INSTALL_PATH%\var\bin\luceneinstall.bat"
+goto end
+
:end
\ No newline at end of file
diff --git a/plugins/ktstandard/documentpreview/documentPreviewPlugin.php b/plugins/ktstandard/documentpreview/documentPreviewPlugin.php
index e405101..5b6d18c 100755
--- a/plugins/ktstandard/documentpreview/documentPreviewPlugin.php
+++ b/plugins/ktstandard/documentpreview/documentPreviewPlugin.php
@@ -79,8 +79,8 @@ class PreviewColumn extends AdvancedColumn {
$width += $thumbnailwidth + 30;
}
- $link = 'sActivation == 'mouse-over'){
$sJs = "javascript: this.t = setTimeout('showInfo(\'$iDocumentId\', \'$sUrl\', \'$sDir\', \'$sLoading\', $width)', $iDelay);";
$link .= 'onmouseover = "'.$sJs.'" onmouseout = "clearTimeout(this.t);">';
diff --git a/setup/wizard/lib/services/unixScheduler.php b/setup/wizard/lib/services/unixScheduler.php
index c959d31..eeb10be 100644
--- a/setup/wizard/lib/services/unixScheduler.php
+++ b/setup/wizard/lib/services/unixScheduler.php
@@ -118,8 +118,6 @@ class unixScheduler extends unixService {
$content .= "done";
@fwrite($fp, $content);
@fclose($fp);
- @chmod($fLoc, '0777');
- $this->util->pexec("chmod 777 $fLoc");
}
function install() {
diff --git a/setup/wizard/lib/services/windowsLucene.php b/setup/wizard/lib/services/windowsLucene.php
index 0ca683d..10ecbe6 100644
--- a/setup/wizard/lib/services/windowsLucene.php
+++ b/setup/wizard/lib/services/windowsLucene.php
@@ -395,6 +395,13 @@ class windowsLucene extends windowsService {
return $this->javaJVM;
}
+ private function writeLuceneInstall($cmd) {
+ $luceneInstallFile = SYS_VAR_DIR."bin".DS."luceneinstall.bat";
+ $fp = fopen($luceneInstallFile, "w+");
+ fwrite($fp, $cmd);
+ fclose($fp);
+ }
+
/**
* Install Lucene Service
*
@@ -415,7 +422,8 @@ class windowsLucene extends windowsService {
echo "$cmd
";
return false;
}
- $response = $this->util->pexec($cmd);
+ $this->writeLuceneInstall($cmd);
+ //$response = $this->util->pexec($cmd);
return $response;
}
return $state;
diff --git a/setup/wizard/lib/services/windowsOpenOffice.php b/setup/wizard/lib/services/windowsOpenOffice.php
index 003d26b..40ae6ef 100644
--- a/setup/wizard/lib/services/windowsOpenOffice.php
+++ b/setup/wizard/lib/services/windowsOpenOffice.php
@@ -198,6 +198,13 @@ class windowsOpenOffice extends windowsService {
return $this->options;
}
+ private function writeOfficeInstall($cmd) {
+ $officeInstallFile = SYS_VAR_DIR."bin".DS."officeinstall.bat";
+ $fp = fopen($officeInstallFile, "w+");
+ fwrite($fp, $cmd);
+ fclose($fp);
+ }
+
public function install() {
$status = $this->status();
if($status == '') {
@@ -208,7 +215,8 @@ class windowsOpenOffice extends windowsService {
echo "$cmd
";
return false;
}
- $response = $this->util->pexec($cmd);
+ $this->writeOfficeInstall($cmd);
+ //$response = $this->util->pexec($cmd);
return $response;
}
return $status;
diff --git a/setup/wizard/lib/services/windowsScheduler.php b/setup/wizard/lib/services/windowsScheduler.php
index 3551623..fb98bb8 100644
--- a/setup/wizard/lib/services/windowsScheduler.php
+++ b/setup/wizard/lib/services/windowsScheduler.php
@@ -86,7 +86,7 @@ class windowsScheduler extends windowsService {
* @return void
*/
function load() {
- $this->setSchedulerDIR($this->varDir."bin");
+ $this->setSchedulerDIR(SYS_VAR_DIR."bin");
$this->setSchedulerScriptPath("taskrunner.bat");
$this->setSchedulerSource("schedulerService.php");
@@ -102,7 +102,7 @@ class windowsScheduler extends windowsService {
*/
private function setSchedulerDIR($schedulerDIR) {
if(!file_exists($schedulerDIR)) {
- @mkdir($schedulerDIR);
+ mkdir($schedulerDIR);
}
$this->schedulerDir = $schedulerDIR;
}
@@ -185,15 +185,19 @@ class windowsScheduler extends windowsService {
if(DEBUG) { // Check if bin is readable and writable
echo "Attempt to Create {$this->getSchedulerDir()}\\taskrunner.bat
";
}
- if(is_readable($this->varDir."bin") && is_writable($this->varDir."bin")) {
- $fp = @fopen($this->getSchedulerDir().""."\\taskrunner.bat", "w+");
- $content = "@echo off \n";
- $content .= "\"".$this->util->useZendPhp()."php.exe\" "."\"{$this->getSchedulerSource()}\"";
- @fwrite($fp, $content);
- @fclose($fp);
- } else {
- echo 'Could not write task runner
'; // TODO: Should not reach this point
- }
+ $taskrunner = SYS_VAR_DIR."bin".DS."taskrunner.bat";
+ $fp = fopen($taskrunner, "w+");
+ $content = "@echo off \n";
+ $content .= "\"".$this->util->useZendPhp()."php.exe\" "."\"{$this->getSchedulerSource()}\"";
+ fwrite($fp, $content);
+ fclose($fp);
+ }
+
+ private function writeSchedulerInstall($cmd) {
+ $schedulerInstallFile = SYS_VAR_DIR."bin".DS."schedulerinstall.bat";
+ $fp = fopen($schedulerInstallFile, "w+");
+ fwrite($fp, $cmd);
+ fclose($fp);
}
/**
@@ -227,7 +231,7 @@ class windowsScheduler extends windowsService {
$state = $this->status();
if($state == '') {
$this->writeTaskRunner();
- if (function_exists('win32_create_service')) { // TODO what if it does not exist? check how the dmsctl.bat does this
+ //if (function_exists('win32_create_service')) { // TODO what if it does not exist? check how the dmsctl.bat does this
if(DEBUG) {
echo '';
print_r(array('service' => $this->name, 'display' => $this->name, 'path' => $this->getSchedulerScriptPath()));
@@ -237,13 +241,15 @@ class windowsScheduler extends windowsService {
echo '';
return ;
}
+ /*
$response = win32_create_service(array(
'service' => $this->name,
'display' => $this->name,
'path' => $this->getSchedulerScriptPath()
));
return $response;
- } else { // Attempt to use the winserv
+ */
+ //} else { // Attempt to use the winserv
// TODO: Add service using winserv
$this->setWinservice();
$this->setOptions();
@@ -252,9 +258,10 @@ class windowsScheduler extends windowsService {
echo "$cmd
";
return false;
}
- $response = $this->util->pexec($cmd);
- return $response;
- }
+ //$response = $this->util->pexec($cmd);
+ //return $response;
+ //}
+ $this->writeSchedulerInstall($cmd);
}
return $state;
}
diff --git a/setup/wizard/steps/configuration.php b/setup/wizard/steps/configuration.php
index 2f5a45a..a8298f8 100644
--- a/setup/wizard/steps/configuration.php
+++ b/setup/wizard/steps/configuration.php
@@ -378,15 +378,7 @@ class configuration extends Step
*/
private function getServerInfo()
{
-// $iis = false;
$script = $_SERVER['SCRIPT_NAME'];
- /*
- $file_system_root = $_SERVER['DOCUMENT_ROOT'];
- if(preg_match('/inetpub/', $file_system_root)) {
- $iis = true;
- $file_system_root = $_SERVER['APPL_PHYSICAL_PATH'];
- }
- */
$file_system_root = realpath(SYSTEM_DIR);
$host = $_SERVER['SERVER_NAME'];
$port = $_SERVER['SERVER_PORT'];
@@ -394,17 +386,10 @@ class configuration extends Step
$pos = strpos($script, '/setup/wizard/');
$root_url = substr($script, 0, $pos);
$root_url = (isset($_POST['root_url'])) ? $_POST['root_url'] : $root_url;
-// echo $file_system_root;
-// if($iis) {
$file_system_root = (isset($_POST['file_system_root'])) ? $_POST['file_system_root'] : $file_system_root;
-// } else {
-// substr($root_url, 1, strlen($root_url))
-// $file_system_root = (isset($_POST['file_system_root'])) ? $_POST['file_system_root'] : $file_system_root.$root_url;
-// }
$host = (isset($_POST['host'])) ? $_POST['host'] : $host;
$port = (isset($_POST['port'])) ? $_POST['port'] : $port;
$ssl_enabled = (isset($_POST['ssl_enabled'])) ? $_POST['ssl_enabled'] : $ssl_enabled;
-
$server = array();
$server['root_url'] = array('name' => 'Root Url', 'setting' => 'rootUrl', 'where' => 'db', 'value' => $root_url);
$server['file_system_root'] = array('name' => 'File System Root', 'section' => 'KnowledgeTree', 'setting' => 'fileSystemRoot', 'where' => 'file', 'value' => $file_system_root);
diff --git a/setup/wizard/templates/complete.tpl b/setup/wizard/templates/complete.tpl
index 7cd99d1..8dd18cf 100644
--- a/setup/wizard/templates/complete.tpl
+++ b/setup/wizard/templates/complete.tpl
@@ -6,11 +6,11 @@
that things are still set up correctly.