Open raulfraile opened 10 years ago
A windows alternative is:
if ($this->isWindows()) {
exec('where '.$command.' 2>&1', $output, $code);
}
// ...
Please note that some commands have bugs (e.g. tar
doesn't support paths indicating the disk (C:\
) in the source/target paths).
@raulfraile Is this feature already wanted and missing? If so, Is there any reason why this feature have not been implemented yet? Can I help with it?
@beni0888 yeah, it's missing and wanted :) The main reason why it wasn't implemented yet is because I don't have a windows machine to test it. Feel free to work on it, that would be awesome!
@raulfraile You could use Appveyor to have builds on Windows too (not useful for developing the feature but for noticing any breaks).
I'll take a look at this today, if no-one else is working on this.
I haven't started working on it yet, so for me there is no problem
Currently, Distill does not try to execute Windows command line tools to decompress files faster, as it does it Unix systems. For example, 7zip is available for Windows too, and it could be used.
The problem
In Unix systems, Distill checks if the command exists through the command utility, and if it exists (exit code is 0), the command can be executed. We need a way to make the same in Windows systems. Currently, if Distill is running on a Windows system, it just disables that method.
How to fix it
Decompression methods are located in the
Distill\Method
namespace. Methods based on command line tools are inDistill\Method\Command
, which extendsAbstractCommandMethod
(it has theexistsCommand
method, the one that it should be modified). If a new method is added, it must be included to the format (e.g. methods for zip files) and in the container.Available tools
This tools could be included once the support for Windows command line tools is added: