thz/Viewer.js — pull request #1 by adityab (2013-07-12 16:30:20+00:00)
Title: Working implementation of PDF.js backend

Viewer.js has a `PluginLoader.js` which overrides the `PluginLoader.js` of webodf's viewer (and that is the only thing that is overridden).

At the moment it checks the extensions of the files passed in the hash, and decides the plugin to use.

My CMake skills are not good, but here's the general gist of it:

1. CMake will clone/update the two external project repositories into a specified download directory.
2. It will then copy webodf's built programs/viewer directory into the Viewer.js build directory.
3. Next, pdf.js is built and and the generated pdf.js file is copied into the build/viewer/ directory.
4. Finally, the code from the Viewer.js source directory is copied into build/viewer, so that all the plugins are now together and the PluginLoader is overwritten with our more general version.
5. The viewer directory is zipped with webodf's zipping tool with the version number in the name.