Build HSLayers ============== HSLayers is extension of OpenLayers, which consist from *patches* to original OpenLayers.js file and *addons* - custom widgets, controls, layers. It also adds some new stuff into :file:`style.css` as well as customises some images. To get all of this integrated and setuped easily, you have to run the build script. The script makes following: 1. Adds patches to :file:`OpenLayers.js` 2. Adds patches to :file:`style.css` 3. Merges *images* with orignal ones 4. Makes compressed version of each JavaScript file 5. Makes comprehensive *all-in-one* files for each HSLayers widget (as :file:`MapPortal.js` for example) Everything is stored in the :file:`build` directory (originally empty). Now, we can build HSLayers:: cd hslayers/tools python build.py --help Usage: build.py [options] Options: -h, --help show this help message and exit -b, --build Build all sources -r, --clear Clear the build directory -d, --documentation Build the documentation -p, --patch Patch the OpenLayers with HSLayers patches -c, --compress Compress HSLayers files -a, --apps Build compressed classes needed by some high-level classes and applications -i, --imagescss Merge CSS and Images -t dir, --target=dir Target directory: /home/jachym/usr/src/hsrs/hslayers/trunk/build The building script should have self-explaining help, but let's talk about it more detaily: `-b, --build` Shortcut for clear, patch, compress, apps and documentation `-r, --clear` Delete everything from target directory `-d, --documentation` Build API documentation using `jsdoc-toolkit utility `_ (assumes, :file:`jsdoc` is in the PATH) `-p, --patch` Add patches, CSS and images to :file:`OpenLayers` `-c, --compress` Compress all JavaScripts - compress HSLayers `-a, --apps` Compress stuff in the Apps directory `-i, --imagescss` Do only images and CSS `-t, --target=dir` Store the results to any directory, default is :file:`hslayers/build` So, the easiest way how to build everything is:: python tools/build.py -b