MapFish Client provides scripts to create an obfuscated JavaScript file, MapFish.js, that contains all the MapFish and OpenLayers JavaScript code.
These scripts are located in MapFish/client/build.
Easy way
The easiest way to build MapFish.js is to run the build.sh script:
sh /path/to/MapFish/client/build/build.sh
This will create the MapFish.js file under MapFish/client/mfbase/release/mapfish.
build.sh being a shell script, this way of doing doesn't apply to Windows.
Further information
build.sh uses build.py internally. build.py was stolen from OpenLayers and adapted to MapFish. You can use build.py directly:
cd /path/to/MapFish/client/build python build.py -c mapfish-widgets -o /path/to/MapFish_sfl.js
Use python build.py --help to know more about the options that can be passed to build.py.
If build.py is executed with no argument, mapfish-widgets and ./MapFish.js will be taken as the default profile and location, respectively.
How to build one obfuscated file for OpenLayers and an other for MapFish
First build a single file for OpenLayers using OpenLayers instructions. For instance :
cd /path/to/MapFish/client/mfbase/openlayers/build python build.py library.cfg /path/to/OpenLayers_sfl.js
Then build MapFish single file using :
cd /path/to/MapFish/client/build python build.py --mfonly -c mapfish-widgets -o /path/to/MapFish_sfl.js