Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Windows compatibility #381

Open
wants to merge 26 commits into from

3 participants

@petebacondarwin

Hi Caolan,

I have made some initial progress on Windows support - mostly around path handling. The general issues here is that nodejs on Windows converts all paths to use back-slashes. Given that you are mostly using node-path already I dived in and fixed up everything to use it. I have run all the tests in the project and they all still pass.

My next step is to move over to node-tar and node-gzip for the package management.

I look forward to your feedback.

Pete

@caolan
Owner

Thanks for your work on this! Looks good, I'll start using it and see I run into any issues. Were you able to push an existing app after these changes? (of course, package management wouldn't work)

@petebacondarwin
@dch

sounds great! I'd love to give it a whirl at some point. @caolan is node stable enough from your perspective wrt kanso, to roll a kanso + node + couch windows package?

@caolan
Owner

@dch I think node would be stable enough, but my experience on windows is very limited. Certainly, Kanso will need some more work before a windows release. A kanso + node + couch package would be fantastic though :D

@petebacondarwin
@dch
petebacondarwin added some commits
@petebacondarwin petebacondarwin Fixed up a few lint errors and used resolve rather than __dirname in …
…test-lib-utils.js.

Added mkdirp node module to replace shell spawn to mkdir, since this didn't play nice in Windows.
2b3f72c
@petebacondarwin petebacondarwin Forgot to change one of the uses of env to environment and remove lea…
…ding slash from relative path for use in resolve.
6760521
@petebacondarwin petebacondarwin Added debug versions of cmd files to help with debugging (surprisingl…
…y enough).
41abbb4
@petebacondarwin petebacondarwin testapps.js tests now passing on Windows
Forgot to require the 'env' module in packages.
Fixed up a couple of lint errors.
Added a check for no output from kanso show to the test.
52ffd0f
@petebacondarwin petebacondarwin Resolve and rimraf
Fixed up some manual path handling to use path.resolve()
Removed shell call to rm -rf and replaced with nodejs module rimraf.
05a9358
@petebacondarwin petebacondarwin Transform tests passing on Windows.
Added a .gitattributes file to specify that the fixture data files should not have the line endings modified by git.
Fixed a couple of lint errors.
472d6ba
@petebacondarwin petebacondarwin kanso install working on Windows e316a74
@petebacondarwin petebacondarwin Fixed some resolves in cache. 3e505d6
@petebacondarwin petebacondarwin Created kanso package Directory Reader (called Packer in lib/packer.js)
This uses the same technology as npm to stream through directories only picking up the files we want in the package.
Included a new set of tests in test-packer.js for this.
Haven't wired this up to the tar.js yet.
e0b8333
@petebacondarwin petebacondarwin Test now uses set equality to account for difference in ordering 4abe6bc
@petebacondarwin petebacondarwin Fixed up bundled dependencies in the packer and initial cut at tar 3f81da6
@petebacondarwin petebacondarwin Added inner package to bundled dependency 0e32463
@petebacondarwin petebacondarwin Added in fstream dependency ac2961a
@petebacondarwin petebacondarwin Renamed Packer to PackageDirReader a9fc6d1
@petebacondarwin petebacondarwin Updated test-pack to use built in tar extractor as this doesn't work …
…on Windows
1e494e2
@petebacondarwin

I have stripped out all the command line use of tar and gzip, replacing them with the node modules used in npm.
I appear to have all the unit tests passing on both Windows and Ubuntu. (I don't have access to a Mac).
Also I can install and push on Windows.

There is one problem I have not been able to fix yet. When kanso packs up a package I can't get the node-tar module to transform the path of the files to prefix the "package" on the front. I have added an Issue to the node-tar repos to add this feature. It is a shame that it is needed, since rather than including package folder in the tarball it would have been easier to leave it out and then ensure that the cache unpacked the tarball into the package folder itself. But since there are loads of packages out there it would break them all to change this now.

Let me know what you think.

Pete

@caolan
Owner

@petebacondarwin In order to get the top-level 'package' directory in the tar.gz files, I think you should be prefixing the path on entry.path in lib/package-dir-reader.js before it emits an 'entry' event...

@petebacondarwin
@dch
@petebacondarwin
@petebacondarwin

OK, so I have fixed up the package folder problem and all the unit tests pass on both Windows (7) and Ubuntu (11.10).
I believe we now have a working kanso on both windows and unix.
Take it for a spin.

@petebacondarwin

No one actually uses this.

@petebacondarwin

Here is the transform to the path.

@petebacondarwin

Added back in the requirement that the extracted path includes the "package" folder"

@petebacondarwin

Added an additional file to the basic test package just to check that folders are packaged up correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2012
  1. @petebacondarwin

    Added environment utility that tries to find the correct home and tem…

    petebacondarwin authored
    …p paths and then monkey patches process.env.HOME
  2. @petebacondarwin

    Added windows command file to enable running of kanso directly as 'bi…

    petebacondarwin authored
    …n/kanso' rather than 'node bin/kanso'
  3. @petebacondarwin
  4. @petebacondarwin

    Updated utils and tests to use path.resolve and path.normalize to ens…

    petebacondarwin authored
    …ure that paths are converted consistently to the operating system standard.
    
    Added a splitPath function to utils that respects the current operating system separator.
  5. @petebacondarwin
  6. @petebacondarwin
Commits on May 14, 2012
  1. @petebacondarwin
  2. @petebacondarwin
  3. @petebacondarwin
Commits on May 15, 2012
  1. @petebacondarwin

    Fixed up a few lint errors and used resolve rather than __dirname in …

    petebacondarwin authored
    …test-lib-utils.js.
    
    Added mkdirp node module to replace shell spawn to mkdir, since this didn't play nice in Windows.
Commits on May 16, 2012
  1. @petebacondarwin

    Forgot to change one of the uses of env to environment and remove lea…

    petebacondarwin authored
    …ding slash from relative path for use in resolve.
  2. @petebacondarwin
  3. @petebacondarwin

    testapps.js tests now passing on Windows

    petebacondarwin authored
    Forgot to require the 'env' module in packages.
    Fixed up a couple of lint errors.
    Added a check for no output from kanso show to the test.
  4. @petebacondarwin

    Resolve and rimraf

    petebacondarwin authored
    Fixed up some manual path handling to use path.resolve()
    Removed shell call to rm -rf and replaced with nodejs module rimraf.
  5. @petebacondarwin

    Transform tests passing on Windows.

    petebacondarwin authored
    Added a .gitattributes file to specify that the fixture data files should not have the line endings modified by git.
    Fixed a couple of lint errors.
  6. @petebacondarwin
Commits on May 18, 2012
  1. @petebacondarwin
  2. @petebacondarwin

    Created kanso package Directory Reader (called Packer in lib/packer.js)

    petebacondarwin authored
    This uses the same technology as npm to stream through directories only picking up the files we want in the package.
    Included a new set of tests in test-packer.js for this.
    Haven't wired this up to the tar.js yet.
Commits on May 21, 2012
  1. @petebacondarwin
  2. @petebacondarwin
  3. @petebacondarwin
  4. @petebacondarwin
Commits on May 22, 2012
  1. @petebacondarwin
  2. @petebacondarwin
Commits on May 24, 2012
  1. @petebacondarwin

    Fixed the PackageDirReader to prefix the paths with package so that t…

    petebacondarwin authored
    …he resulting tar is in the correct format.
Commits on May 29, 2012
  1. @petebacondarwin
Something went wrong with that request. Please try again.