mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 03:57:08 -04:00
Add commands support for Windows
This commit is contained in:
parent
ed1ab4053c
commit
ed9f04a372
1 changed files with 3 additions and 3 deletions
|
@ -119,7 +119,7 @@ class Setup {
|
|||
$cmds = Json::load($cmds_cache_path);
|
||||
if (sizeof($cmds) === 0 || $this->refresh) {
|
||||
$cmds['command'] = Util::exec_0('command -v command');
|
||||
$cmds['which'] = Util::exec_0('which which');
|
||||
$cmds['which'] = Util::exec_0('which which') ? true : Util::exec_0('which which.exe');
|
||||
|
||||
$cmd = false;
|
||||
if ($cmds['command']) {
|
||||
|
@ -129,7 +129,7 @@ class Setup {
|
|||
}
|
||||
|
||||
foreach (['avconv', 'convert', 'du', 'ffmpeg', 'gm', 'tar', 'zip'] as $c) {
|
||||
$cmds[$c] = ($cmd !== false) && Util::exec_0($cmd . ' ' . $c);
|
||||
$cmds[$c] = ($cmd !== false) && Util::exec_0($cmd . $c) || Util::exec_0($cmd . $c . '.exe');
|
||||
}
|
||||
|
||||
Json::save($cmds_cache_path, $cmds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue