Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of Windows command line tools to decompress files #6

Open
raulfraile opened this issue Nov 28, 2014 · 6 comments
Open

Make use of Windows command line tools to decompress files #6

raulfraile opened this issue Nov 28, 2014 · 6 comments

Comments

@raulfraile
Copy link
Owner

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 in Distill\Method\Command, which extends AbstractCommandMethod (it has the existsCommand 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:

@wouterj
Copy link

wouterj commented Mar 31, 2015

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).

@beni0888
Copy link

@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?

@raulfraile
Copy link
Owner Author

@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!

@xabbuh
Copy link
Contributor

xabbuh commented Jan 30, 2016

@raulfraile You could use Appveyor to have builds on Windows too (not useful for developing the feature but for noticing any breaks).

@wouterj
Copy link

wouterj commented Jan 30, 2016

I'll take a look at this today, if no-one else is working on this.

@beni0888
Copy link

I haven't started working on it yet, so for me there is no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants