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.

  1. Download phantomjs and casperjs and unzip them in c:\phantomjs and c:\casperjs. Like it’s 1984.

  2. 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.