Windows Compatibility

523 views
Skip to first unread message

Peter Bacon Darwin

unread,
May 29, 2012, 6:16:36 AM5/29/12
to ka...@googlegroups.com
Dear all,
I have been hacking away on Kanso to get it working cleanly on Windows.  I believe it is just about there now.  Primarily this has involved moving over to NodeJS based npm libraries rather than relying on command line tools (e.g. rimraf rather than rm -rf, node-tar and node-zlib rather than tar and mkdirp rather than mdkir -p).  Going forward the biggest concern is that Windows paths have backslashes and everyone else, including URLs, use forward slashes so we have to be careful that anything that goes in a design document has a correctly mapped path.

The two projects to which I have made changes are kanso itself and kanso-utils.  I have forked both projects (kanso, kanso-utils) and created windows-compat branches in each.  There are pull requests (kanso, kanso-utils) back to the kanso repos, where you can make comments if you wish.

Unfortunately, since they rely upon kanso-utils, it is likely that many of the packages will need to be updated to ensure Windows compatibility across the board.  Once the kanso-utils pull request is accepted then a new npm module will need to be built and then each package will need to update their version of it and then publish back to the kanso repository.

If you want to try out kanso on windows here is a quick guide to getting it up and running.
These are both Windows Installer utilities which make life easier.  CouchDB should install and start up as a service listening to the default port 5984.  You can check this by going to the futon.
Clone my kanso repos:
Checkout the window-compat branch:
  • cd kanso
    git checkout windows-compat
To run kanso you will need to put the kanso/bin folder in your path or refer to it explicitly. (i.e. c:\path\to\my\kanso\bin\kanso.cmd ...).  Note that we are using the kanso.cmd file since it tells Windows to run kanso inside NodeJS.  I created a kanso.cmd inside the root of my kanso app that for now. C:\path\to\my\kanso\app\kanso.cmd:
  • node  "C:\path\to\my\fork\of\kanso\bin\kanso" %*
Create your kanso app as normal (i.e. your kanso.json file and anything else you need) then try running kanso install in the apps folder. This should pull down any kanso packages you have specified as dependencies in the kanso.json.
  • kanso install
Now the tricky bit...  We need to go into each package (particularly attachments, modules and properties) that uses kanso-utils (you can find it in the node_modules folder of each package), delete the kanso-utils folder and checkout my fork of kanso-utils instead.
Once you have done this go back up to your application folder and try a kanso show, kanso ls or even a kanso push command.  Also try the kanso upload, which should work fine too.
  • kanso push test
I welcome any feedback if you have a chance to take this for a run or even just have a look at the commits.

One thing I don't like is this reliance on kanso-utils everywhere.  It seems to me that we should package that up inside the kanso project and then expose it to the packages when they are run rather than expecting them to manage the dependency themselves.  Any thoughts?

Cheers

Pete

Caolan McMahon

unread,
May 31, 2012, 2:02:02 PM5/31/12
to ka...@googlegroups.com
Thanks for your awesome work on this Pete, it's looking really good so far.

I'd like to make a plea to anyone else interested in supporting this
to start running Pete's windows-compat branch. Even if you're not
running windows it will help us check for regressions.

Thanks!

Caolan

Ged Wed

unread,
Sep 24, 2012, 2:18:11 PM9/24/12
to ka...@googlegroups.com
any status updates on this bug in Kanso ? Would like to see this in the NPM install of Kanso if its stable :)

g

Youdaman

unread,
Nov 26, 2012, 3:29:36 AM11/26/12
to ka...@googlegroups.com
Thanks very much for your instructions Peter!

For anyone else reading, here's a couple of handy aliases you can add to your .bashrc (assuming you're using a bash prompt in Windows that is -- I'm using "Git Bash" that comes with "Git for Windows" http://msysgit.github.com/):

alias kanso='/e/Projects/kanso/bin/kanso'
alias ku='find -name kanso-utils | xargs -n 1 dirname | xargs -n 1 cp -r /e/Projects/kanso-utils/'

The above also assume that Peter's versions of kanso and kanso-utils live in /e/Projects (aka E:\Projects) -- you would simply need to change the path to suit your particular setup.

This way I can run "kanso install" followed by "ku" to set things up nicely in Windows :)

Hope this helps someone!

Charles Ross

unread,
Oct 9, 2013, 10:03:48 AM10/9/13
to ka...@googlegroups.com
I was able to get the Simplest Possible example to work from Windows 8, but only after copying my app's kanso.json file to this path:

C:\Users\charles\.kanso\cache\attachments\0.0.10\package

Because kanso did not find the one under the kanso app folder (which was the current directory when i typed "kanso install").

Once I did that, the "install" command worked, and I was able to push it to my IrisCouch place.

This project suffers from fragmentary documentation, because if you believe what's written on kan.so (http://kan.so/docs/Installing_on_Windows), you will use NPM to setup kanso, which I had done first. Then I read this and ran "
npm  uninstall -g kanso" and started over at "Clone my kanso repos". 

Somebody needs to tie these "latest updates" about the Windows port of Kanso together if you want Windows people to stay with you!

Milan Andric

unread,
Oct 9, 2013, 2:48:06 PM10/9/13
to ka...@googlegroups.com

Windows support is still an open issue:



We just need someone who is using windows to help pull the branch together.

--
You received this message because you are subscribed to the Google Groups "kanso" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kanso+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Charles Ross

unread,
Oct 10, 2013, 10:12:11 AM10/10/13
to ka...@googlegroups.com
I understand, but the kan.so wiki page included a non-working install step. It implied that installing kanso with npm worked. That's how you lose people. I updated the wiki to point interested Windows people here.

Milan Andric

unread,
Oct 10, 2013, 12:12:34 PM10/10/13
to ka...@googlegroups.com
Awesome, thanks!

Destiny Architect

unread,
Oct 14, 2013, 2:25:42 AM10/14/13
to ka...@googlegroups.com
  1. Today http://CouchApp.Org (and it's reference strong to http://Garden20.com ) especially 1st told & recommended me to http://Kan.so and as it seems to me possibly the most powerful CouchApp creator, so I then went to try it.
  2. And unfortunately I must confess I don't have yet have serious Linux laptop/desktop handy at the moment, instead currently again on Windows (ugh!), so on that:
    1. Thanks, guys, for all the work you've done here to get Windows working! (at least until the world is rid of Windows ;-).
    2. I running all latest recommended software (specifically Win7 with latest updates, http://www.apache.org/dyn/closer.cgi?path=/couchdb/binary/win/1.4.0/setup-couchdb-1.4.0_R14B04.exe (which worked perfectly for http://pouchdb.com/getting-started.html ) , https://github.com/downloads/bmatzelle/gow/Gow-0.7.0.exe , http://nodejs.org/dist/v0.10.20/x64/node-v0.10.20-x64.msi ,  http://github-windows.s3.amazonaws.com/GitHubSetup.exe (GitHub for Windows) "1.2.0.10 (e4588ba)" Git Shell (a Windows Powershell)) and only by following these instructions of the top post (thanks much, Peter!) plus here specially copying the kanso.json (thanks, Charles!), for the 1st demo http://kan.so/docs/Simplest_possible_app#pushingtheapp I was able to get "C:\Users\$env:username\Downloads\kanso\bin\kanso.cmd install" and ".. push http://localhost:5984/example " to report "OK" and with no error, but then http://localhost:5984/example/_design/example-app/index.html reported {"error":"not_found","reason":"Document is missing attachment"} seemingly from the document existing but missing all attachments, and searching for the error http://google.com/search?q=Kanso+"Document+is+missing+attachment" finds nothing well-matching (know a fix, anyone?); 
    3. So at least for now sadly I've stopped trying to use Kanso and looking for Kanso alternatives (recommend any?) from https://cloudant.com/blog/app-management/ ...plus soon working on escaping from Windows to Linux again :-)

Destiny Architect

unread,
Oct 14, 2013, 2:30:53 AM10/14/13
to ka...@googlegroups.com
The 2nd link is a link to this thread, but the the 1st is the official support issue (for "basic windows support"), so thanks for that; and I note that the support issue for this is marked closed (as of 1 year ago); this seems very much incorrect; please reopen & keep open until Kanso is installing & running smoothly on Windows including the docs for it are complete.

Phil V

unread,
Nov 3, 2013, 12:25:31 AM11/3/13
to ka...@googlegroups.com
I'm hoping to try this out soon. I dappled in this about a year ago, bit did not find this until I revisited just now. Not using for production or anything so not a lot of time to spend, looks like some really great stuff though! Can't wait to see how it all works together!
Reply all
Reply to author
Forward
0 new messages