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 #1

Closed
jrburke opened this Issue Jan 3, 2012 · 7 comments

Comments

Projects
None yet
3 participants
@jrburke
Member

jrburke commented Jan 3, 2012

Work it out. Some things in particular:

  • Right now tar -z and rm are used via child_process. How does that work in Windows? Show zip files be used instead? Is there a reliable zip utility that can be used in Node, something that is not a binary component that needs to be built to ship volo?
  • How would symlinks work?
@jzaefferer

This comment has been minimized.

Show comment
Hide comment
@jzaefferer

jzaefferer Jan 11, 2012

npm will eventually use node-tar (I think), that should help: https://github.com/isaacs/node-tar

npm also has to deal with symlinks, so isaacs might be a good goto person for that as well.

jzaefferer commented Jan 11, 2012

npm will eventually use node-tar (I think), that should help: https://github.com/isaacs/node-tar

npm also has to deal with symlinks, so isaacs might be a good goto person for that as well.

@strathmeyer

This comment has been minimized.

Show comment
Hide comment
@strathmeyer

strathmeyer Jan 30, 2012

I'll take a look at this.

Mingw will provide rm support: http://www.mingw.org/ Mingw is installed by the Railinstaller (though it may not add the correct directory to the PATH), which is the easiest way to install git w/ ssh support on Windows IMO. I think it's reasonable to ask someone to have mingw/devkit installed and on their path if they want to use volo.

There are a couple tar.exe's out there floating around. I had some trouble piping into one of them, but it may work in this case. I'll investigate.

Win7 supports symbolic links, but I'm not sure if they have all the same properties as *nix symlinks that we need: http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link

strathmeyer commented Jan 30, 2012

I'll take a look at this.

Mingw will provide rm support: http://www.mingw.org/ Mingw is installed by the Railinstaller (though it may not add the correct directory to the PATH), which is the easiest way to install git w/ ssh support on Windows IMO. I think it's reasonable to ask someone to have mingw/devkit installed and on their path if they want to use volo.

There are a couple tar.exe's out there floating around. I had some trouble piping into one of them, but it may work in this case. I'll investigate.

Win7 supports symbolic links, but I'm not sure if they have all the same properties as *nix symlinks that we need: http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Jan 30, 2012

Member

@strathmeyer thanks. I think I'm tending towards wanting to try https://github.com/isaacs/node-tar as @jzaefferer mentions -- it means it is just plain JS and I can get away from the child_process use. If you want some pointers on how to integrate that code into volo, i think the r.js -convert command will allow wrapping the modules in a define call, then we just need to keep the code in a directory in volo, similar to how uglifyjs is currently stored.

I'm also working at the moment of having the amdify command do this commonjs wrapping code too.

I'm OK if the first release for windows does not do symlinks, although hopefully if the node command for it works on windows, that will just be solved for us.

Feel free to post back early and often on your findings. Once I get the amdify command beefed up with cjs wrapping and detecting for an existing define() call, I'll be ready to focus on this issue some more.

Member

jrburke commented Jan 30, 2012

@strathmeyer thanks. I think I'm tending towards wanting to try https://github.com/isaacs/node-tar as @jzaefferer mentions -- it means it is just plain JS and I can get away from the child_process use. If you want some pointers on how to integrate that code into volo, i think the r.js -convert command will allow wrapping the modules in a define call, then we just need to keep the code in a directory in volo, similar to how uglifyjs is currently stored.

I'm also working at the moment of having the amdify command do this commonjs wrapping code too.

I'm OK if the first release for windows does not do symlinks, although hopefully if the node command for it works on windows, that will just be solved for us.

Feel free to post back early and often on your findings. Once I get the amdify command beefed up with cjs wrapping and detecting for an existing define() call, I'll be ready to focus on this issue some more.

@strathmeyer

This comment has been minimized.

Show comment
Hide comment
@strathmeyer

strathmeyer Jan 31, 2012

Thanks for the extensive response. I'll try it out and report back.

strathmeyer commented Jan 31, 2012

Thanks for the extensive response. I'll try it out and report back.

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Feb 7, 2012

Member

I'm going to do a small step in this direction and clean up the file.rm() function to just do a resursive, sync remove of the files instead of forking out to 'rm -rf'. This should make it easier to use file.rm() and then also work on windows. Holler if I'm stepping on any toes.

Member

jrburke commented Feb 7, 2012

I'm going to do a small step in this direction and clean up the file.rm() function to just do a resursive, sync remove of the files instead of forking out to 'rm -rf'. This should make it easier to use file.rm() and then also work on windows. Holler if I'm stepping on any toes.

@strathmeyer

This comment has been minimized.

Show comment
Hide comment
@strathmeyer

strathmeyer Feb 7, 2012

All clear here. I'm swamped until March. :)

strathmeyer commented Feb 7, 2012

All clear here. I'm swamped until March. :)

jrburke added a commit that referenced this issue Feb 7, 2012

change file.rmdir to file.rm, use sync fs methods and recursion inste…
…ad of a child process. Should help make rm portable to Windows for issue #1.
@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Feb 11, 2012

Member

OK, I think I have this working, but I had to switch to using zip archives instead of tar.gz, since I was able to use a JS-implementation of zip. The work spanned a few commits in a feature branch that was just merged, so I cannot point to one final commit for this issue. I also expect it will require constant gardening going forward. In any case, the basic "create" and "add" seem to work on Windows now, so closing this out, and we can use specific tickets to track specific issues going forward.

Member

jrburke commented Feb 11, 2012

OK, I think I have this working, but I had to switch to using zip archives instead of tar.gz, since I was able to use a JS-implementation of zip. The work spanned a few commits in a feature branch that was just merged, so I cannot point to one final commit for this issue. I also expect it will require constant gardening going forward. In any case, the basic "create" and "add" seem to work on Windows now, so closing this out, and we can use specific tickets to track specific issues going forward.

@jrburke jrburke closed this Feb 11, 2012

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