mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 07:58:58 +01:00
Windows support
This commit is contained in:
parent
bc13e61526
commit
7a550311ac
@ -38,8 +38,14 @@ final class ProcessRunner extends RunnerAbstract
|
||||
|
||||
$runner = self::getScriptPath();
|
||||
|
||||
if (\strtolower(\substr(PHP_OS, 0, 3)) === 'win') {
|
||||
$binary = \str_replace("Program Files", "PROGRA~1", $binary);
|
||||
// Pray there are no spaces in the name, escapeshellarg would help but windows doesn't want quotes in the program name
|
||||
} else {
|
||||
$binary = \escapeshellarg($binary);
|
||||
}
|
||||
$command = \implode(" ", [
|
||||
\escapeshellarg($binary),
|
||||
$binary,
|
||||
self::formatOptions($options),
|
||||
$runner,
|
||||
'madeline-ipc',
|
||||
|
Loading…
Reference in New Issue
Block a user