[Commits] r1084 - core/trunk/geoext/build
commits at geoext.org
commits at geoext.org
Tue Jun 16 11:51:04 CEST 2009
Author: ahocevar
Date: 2009-06-16 11:51:04 +0200 (Tue, 16 Jun 2009)
New Revision: 1084
Added:
core/trunk/geoext/build/Makefile
Modified:
core/trunk/geoext/build/readme.txt
Log:
added a Makefile for a fancy build process which will also build compressed css files (using csstidy). Updated readme.txt to explain the new process.
Added: core/trunk/geoext/build/Makefile
===================================================================
--- core/trunk/geoext/build/Makefile (rev 0)
+++ core/trunk/geoext/build/Makefile 2009-06-16 09:51:04 UTC (rev 1084)
@@ -0,0 +1,68 @@
+# Makefile for GeoExplorer apps
+
+LIB_NAME = GeoExt
+ZIP_NAME = $(LIB_NAME).zip
+
+CSS_DIR = $(LIB_NAME)/resources/css
+CSS_IMPORTS = $(shell cat ../resources/css/geoext-all-debug.css | grep '@import' | sed 's/^@import "\(.*\)";/\1/')
+ALL_CSS = $(CSS_DIR)/geoext-all.css
+
+.PHONEY: help clean ext examples lib zip dist
+
+help:
+ @echo "Please use 'make <target>' where <target> is one or more of"
+ @echo " clean to clean up after building"
+ @echo " ext to make a custom Ext JS build. See readme.txt for requirements"
+ @echo " examples to make the examples dir"
+ @echo " lib to make a standalone dir of lib resources"
+ @echo " zip to make a zip archive of a standalone lib"
+ @echo " dist to make a zip archive of a standalone lib with examples"
+ @echo
+ @echo "Example use:"
+ @echo " make lib"
+ @echo " make lib LIB_NAME=MyLib"
+ @echo " make zip"
+ @echo " make zip ZIP_NAME=MyZip.zip"
+
+clean:
+ -rm -rf $(LIB_NAME)
+ -rm -f $(ZIP_NAME)
+
+ext:
+ @echo "Building ext.js."
+ mkdir -p $(LIB_NAME)/script
+ jsbuild full.cfg -v -o $(LIB_NAME)/script/ -s ext.js
+
+examples:
+ mkdir -p $(LIB_NAME)/examples
+ svn export --force ../examples $(LIB_NAME)/examples
+ for file in `find $(LIB_NAME)/examples/ -name "*.html"`; do \
+ sed -i "s/\.\.\/lib\/GeoExt\.js/\.\.\/script\/GeoExt\.js/g" $${file} ; \
+ sed -i "s/geoext-all-debug\.css/geoext-all\.css/g" $${file} ; \
+ done ;
+
+lib:
+ @echo "Building the library."
+ mkdir -p $(LIB_NAME)/script $(LIB_NAME)/resources/css
+
+ jsbuild full.cfg -v -o $(LIB_NAME)/script/ -s GeoExt.js
+
+ svn export --force ../resources $(LIB_NAME)/resources
+
+ for file in `find $(CSS_DIR) -name "*.css"`; do \
+ csstidy $${file} --template=highest $${file} ; \
+ done ;
+ echo "" > $(ALL_CSS)
+ for filename in $(CSS_IMPORTS); do \
+ cat $(CSS_DIR)/$${filename} >> $(ALL_CSS) ; \
+ done ;
+ -rm $(CSS_DIR)/geoext-all-debug.css
+
+ cp ../license.txt $(LIB_NAME)
+
+zip: lib
+ @echo "Archiving the library."
+ -rm -f $(ZIP_NAME)
+ zip $(ZIP_NAME) -r $(LIB_NAME)
+
+dist: examples zip
\ No newline at end of file
Modified: core/trunk/geoext/build/readme.txt
===================================================================
--- core/trunk/geoext/build/readme.txt 2009-06-16 08:53:05 UTC (rev 1083)
+++ core/trunk/geoext/build/readme.txt 2009-06-16 09:51:04 UTC (rev 1084)
@@ -2,23 +2,54 @@
===============
This directory contains configuration files necessary for building GeoExt
-(and ExtJS). The build configuration is intended for use with the jsbuild
+(and Ext JS). The build configuration is intended for use with the jsbuild
utility included in JSTools (http://projects.opengeo.org/jstools).
Brief instructions
------------------
-Install JSTools.
+This build dir contains a Makefile, which can be used to build GeoExt. The
+build process requires a bash-like shell, make, sed, find and svn. All this
+should be available on well equipped development *nix and OS X boxes. In
+addition, JSTools and csstidy are required. The latter is available as csstidy
+package on debian-style linux systems.
+ $ sudo aptitude install csstidy
+
+To install JSTools, python-setuptools is required. This is available as
+python-setuptools package on debian-style linux systems.
+
+ $ sudo aptitude install python-setuptools
+
+Now you can easily install JSTools.
+
$ easy_install http://svn.opengeo.org/jstools/trunk/
-Change into the core/trunk/build directory.
+Change into the core/trunk/build directory (the one containing the readme.txt
+file you are reading right now), if you are not already here.
- $ cd core/trunk/geoext/build
+ $ cd geoext/build
-Run jsbuild.
+From here, you can build the library.
- $ jsbuild full.cfg
+ $ make zip
-For more complete instructions on building GeoExt, see the documentation
-on the project website: http://www.geoext.org/trac/geoext/wiki/builds.
+Now you can take the resulting GeoExt.zip file and unpack it on your web
+server. The library itself resides in the script folder, the resources folder
+contains css files and images.
+
+For more complete instructions on building GeoExt with jsbuild, see the
+documentation on the project website:
+http://www.geoext.org/trac/geoext/wiki/builds.
+
+The Makefile also contains a target for building Ext JS. This requires Ext JS
+to be installed in ../../ext (relative to this build dir). Make sure to
+provide a license file matching your Ext JS installation and replace the
+provided ext-license.js file with it. To build the library with ext.js in the
+script folder, run make with the ext and zip targets.
+
+ $ make ext zip
+
+The Makefile has even more targets. Invoke make help to see them all.
+
+ $ make help
\ No newline at end of file
More information about the Commits
mailing list