Skip to content

Commit

Permalink
More Windows improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Dec 13, 2023
1 parent f6449d4 commit b6726df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 9 additions & 3 deletions app/Config/OpenAudit.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ public function __construct()
'/usr/local/opmojo',
'c:\\omk');

$binaries = array(APPPATH . '../other/enterprise.bin',
APPPATH . '../other/enterprise.exe',
'/usr/local/oac/enterprise.pl');
if (php_uname('s') === 'Windows NT') {
$commercial_dir = array('c:\\omk');
}

$binaries = array(APPPATH . '../other/enterprise.bin', '/usr/local/oac/enterprise.pl');

if (php_uname('s') === 'Windows NT') {
$binaries = array(APPPATH . '../other/enterprise.exe');
}

$nmis = "/usr/local/nmis9";

Expand Down
6 changes: 2 additions & 4 deletions app/Helpers/response_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,9 @@ function response_create($instance = null)
// Call the binary and wait for it's response
unset($output);
if (php_uname('s') === 'Windows NT') {
#$command = "%comspec% /c start /b " . $config->enterprise_binary . " $id";
$command = "%comspec% /c start /b enterprise.exe $id";
$command = "%comspec% /c start /b " . $config->enterprise_binary . " $id";
if (!empty($_SERVER['CI_ENVIRONMENT']) and $_SERVER['CI_ENVIRONMENT'] === 'development') {
#$command = "%comspec% /c start /b " . $config->enterprise_binary . " --debug $id";
$command = "%comspec% /c start /b enterprise.exe --debug $id";
$command = "%comspec% /c start /b " . $config->enterprise_binary . " --debug $id";
log_message('debug', $command);
}
$cwd = getcwd();
Expand Down

0 comments on commit b6726df

Please sign in to comment.