All solutions: see script all.sh. Here is a zip archive of the relevant source files (note: they will expand into the current directory when unzipped).