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

Windows support #198

Closed
mcandre opened this issue Mar 5, 2014 · 10 comments
Closed

Windows support #198

mcandre opened this issue Mar 5, 2014 · 10 comments

Comments

@mcandre
Copy link

mcandre commented Mar 5, 2014

Could we get Windows support for cask? When I try to install cask, I get an error.

Trace:

C:\Users\andrew\Desktop\src>curl -fsSkL https://raw.github.com/cask/cask/master/
go | python
Cloning into '$HOME/.cask'...
remote: Reusing existing pack: 2904, done.
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 2908 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2908/2908), 793.27 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1621/1621), done.
Checking connectivity... done
Traceback (most recent call last):
  File "<stdin>", line 100, in <module>
  File "<stdin>", line 90, in main
  File "<stdin>", line 61, in bootstrap_cask
  File "C:\Python27\lib\subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Python27\lib\subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 709, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 957, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

The installer seems to be trying to clone the cask code into $HOME/.cask, which means a literal $HOME folder in Windows. Could $HOME be replaced with expanduser for better cross-platform support? http://stackoverflow.com/a/4028943/350106

@rejeep
Copy link
Member

rejeep commented Mar 5, 2014

@lunaryorn Can you take this one since it's all Python-land!?

@swsnr
Copy link
Contributor

swsnr commented Mar 5, 2014

@rejeep Do we actually have “official” Windows support in Cask?

I don't have a Windows system to test. I can make the suggested change, but ultimately I'm unable to debug or test it, so I'd rather not go as far as to promise Windows support.

What's your policy on this?

@rejeep
Copy link
Member

rejeep commented Mar 5, 2014

@rejeep Do we actually have “official” Windows support in Cask?

No and I will not be the one supporting it if we do add it. I was thinking though, that since bin/cask is now written in Python, it may work.

We could always change the suggestion above and Cask might work on Windows if we are lucky. I don't think that you or me should do anything more about it. If someone wants Windows support, they would have to maintain it as well.

@swsnr
Copy link
Contributor

swsnr commented Mar 5, 2014

@rejeep I'll make the change then.

@swsnr swsnr closed this as completed in c6a30da Mar 5, 2014
@swsnr
Copy link
Contributor

swsnr commented Mar 5, 2014

@mcandre I replaced $HOME with os.path.expanduser and os.path.join. That should make the installer work on Windows.

Please note however, that we do not support Cask on Windows, and that Cask will not generally work on Windows. Most parts should more or less work, since the underlying Emacs features are platform-independent, but other parts (notably cask exec) rely on specific Unix features and will probably never work on Windows.

@rejeep
Copy link
Member

rejeep commented Mar 6, 2014

@lunaryorn See melpa/melpa#1555

@swsnr
Copy link
Contributor

swsnr commented Mar 6, 2014

@rejeep Shit, a typo in go. Will fix it...

swsnr added a commit that referenced this issue Mar 6, 2014
@swsnr
Copy link
Contributor

swsnr commented Mar 6, 2014

@rejeep Fixed in fa36d15

@rejeep
Copy link
Member

rejeep commented Mar 6, 2014

@lunaryorn Great, thanks! :)

@mcandre
Copy link
Author

mcandre commented Mar 6, 2014

Thanks to the $HOME -> expanduser change, I was able to get a little bit further in the initial install.

Trace:

C:\Users\andrew>curl -fsSkL https://raw.github.com/cask/cask/master/go | python
Cloning into 'C:\Users\andrew\.cask'...
remote: Reusing existing pack: 2919, done.
Rremote: Total 2919 (delta 0), reused 0 (delta 0)        KiB/s
Receiving objects: 100% (2919/2919), 793.23 KiB | 926.00 KiB/s, done.
Resolving deltas: 100% (1630/1630), done.
Checking connectivity... done
Traceback (most recent call last):
  File "<stdin>", line 100, in <module>
  File "<stdin>", line 90, in main
  File "<stdin>", line 62, in bootstrap_cask
  File "C:\Python27\lib\subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Python27\lib\subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 709, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 957, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

The bootstrapping script seems to have some difficulty running. This could be due to Window's serious lack of support for shebangs.

For this reason, it might help during bootstrap to explicitly call python .../cask, rather than cask by itself, and/or add a script alongside cask as cask.bat, that does the same thing.

Here's an example .bat file in another project that does this:

https://github.com/mcandre/specs/tree/master/bin

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

No branches or pull requests

3 participants