Install CasperJS with PhantomJS on Cygwin
Stumbled across this much easier solution today for rigging up my favorite modern headless javascriptable browser tools on my favorite Windows-compatible shell. Should work in pretty much all versions of Windows/Cygwin/phantomjs/casperjs.
Download phantomjs and casperjs and unzip them in c:\phantomjs and c:\casperjs. Like it’s 1984.
Make them more cygwinny. As a local admin†:
cd /usr/local/bin ln -s /cygdrive/c/casperjs/bin/casperjs.exe ### BROKEN: ln -s /cygdrive/c/phantomjs/phantomjs.exe # Aww, casperjs doesn't speak Cygwin symlinks. cp /cygdrive/c/phantomjs/phantomjs.exe ./ chmod 755 ./phantomjs.exe |
† Right-click the Mintty shortcut and “Open as Administrator”. Don’t think too hard.
Thanks for this. Quick question, why does cygwin shell need to be opened as administrator?
Hi Cary, I’m glad someone’s paying attention. You could fuss with things to get it to run from somewhere else, but this seemed most straightforward. I’ve always been confused about the Cygwin equivalent of
sudo
but I realized here just running Cygwin as administrator is likesu
.