Remove old build files

This commit is contained in:
Éric Lemoine
2012-09-28 16:30:06 +02:00
parent 3aabf117bc
commit 6cf964b3ae
4 changed files with 0 additions and 182 deletions

View File

@@ -1,51 +0,0 @@
# Build Utilities
This directory contains utilities used for building OpenLayers applications,
generating the API docs, and building hosted versions of the library.
## Dependencies
OpenLayers is built using [Closure Compiler][closure]. The [plovr][plovr] build
tool simplifies building with Closure Compiler and comes with a built-in version
of the Closure Library and Compiler. Both the Compiler and plovr require Java
version 1.6 or above. This directory includes a bash/batch script for driving
plovr. For pulling down plovr and accessing it in a cross-platform way,
[Ant][ant] is used.
The instructions below assume that you have added the `ol` bash/batch script to
your path (type `ol` and see usage docs to confirm this is set up).
[closure]: https://developers.google.com/closure/compiler/
[plovr]: http://plovr.com/
[ant]: http://ant.apache.org/
## Building an Application
To compile an application together with OpenLayers, you will provide a build
configuration file for the compiler. See the `demo` folder for example
configuration files (e.g. `map.json`).
Compile your application with the `build` command:
ol build path/to/config.json
Substitute the path to your build configuration file above.
## Building the API Docs
From within the root of the OpenLayers directory, use the `doc` command to build
the API docs:
ol doc
This will generate documentation in the `jsdoc` directory.
## Building the Hosted Library
To compile the full OpenLayers api, use the `build` command from the root of the
OpenLayers directory:
ol build
This will generate an `api.js` script in the same directory. (This is equivalent to `ol build path/to/ol/api.json`.)

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="ol" default="usage">
<description>
OpenLayers Dev Utilities
</description>
<property name="ol.home" location=".."/>
<property name="plovr.version" value="4b3caf2b7d84"/>
<property name="plovr.jar" location="${ol.home}/bin/plovr-${plovr.version}.jar"/>
<property name="main.json" location="${ol.home}/main.json"/>
<property name="build.json" location="${ol.home}/api.json"/>
<target name="usage">
<echo>
Available commands:
serve - Run the library server
build - Builds a minified version of the library or an application
doc - Generate the reference docs
</echo>
</target>
<condition property="plovr.exists">
<available file="${plovr.jar}" type="file"/>
</condition>
<target name="deps" unless="plovr.exists">
<get src="http://plovr.googlecode.com/files/plovr-${plovr.version}.jar"
dest="${plovr.jar}"/>
</target>
<target name="serve" depends="deps">
<java jar="${plovr.jar}" fork="true">
<arg value="serve"/>
<arg value="${main.json}"/>
</java>
</target>
<target name="checkpath">
<condition property="build.json.set">
<isset property="build.json"/>
</condition>
<fail message="Missing build config." unless="build.json.set"/>
<property name="build.json.fullpath" location="${build.json}"/>
<condition property="build.json.exists">
<available file="${build.json.fullpath}" type="file"/>
</condition>
</target>
<target name="build" depends="deps, checkpath">
<fail message="Build config '${build.json.fullpath}' doesn't exist." unless="build.json.exists"/>
<java jar="${plovr.jar}" fork="true">
<arg value="build"/>
<arg value="${build.json}"/>
</java>
</target>
<target name="doc" depends="deps">
<java jar="${plovr.jar}" fork="true">
<arg value="jsdoc"/>
<arg value="${main.json}"/>
</java>
</target>
</project>

44
bin/ol
View File

@@ -1,44 +0,0 @@
#!/bin/bash
ant -version &> /dev/null
if [ $? -ne 0 ]; then
echo 'Requires Apache Ant (see http://ant.apache.org/)'
exit 1
fi
NAME=$(basename -- "$0")
# find ol home
if [ -z "$0" ]; then
# as a last recourse, use the present working directory
OL_HOME=$(pwd)
else
# save original working directory
ORIG_PWD="$(pwd -P)"
# get the absolute path of the executable
SELF_PATH=$(
cd -P -- "$(dirname -- "$0")" \
&& pwd -P
) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
# resolve symlinks
while [ -h "$SELF_PATH" ]; do
DIR=$(dirname -- "$SELF_PATH")
SYM=$(readlink -- "$SELF_PATH")
SELF_PATH=$(cd -- "$DIR" && cd -- $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
done
OL_HOME=$(dirname -- "$(dirname -- "$SELF_PATH")")
# restore original working directory
cd "$ORIG_PWD"
fi
ANT_ARGS=""
if [ $# -gt 1 ]; then
ANT_ARGS=-Dbuild.json="$2"
fi
ant -e -f "$OL_HOME/bin/build.xml" -Dbasedir=. -Dol.home="$OL_HOME" $1 $ANT_ARGS

View File

@@ -1,21 +0,0 @@
@echo off
:: Check for ant on the path
call ant -version >NUL 2>NUL || (
echo Requires Apache Ant ^(see http://ant.apache.org/^)
exit /b 1
)
:: Find the full path of OL_HOME
pushd "%~dp0.."
set OL_HOME="%cd%"
popd
:: Run the command
set COMMAND="%~1"
if "%~1" == "" set COMMAND="usage"
set ANT_ARGS=
if "%~2" == "" set ANT_ARGS="-Dbuild.json=%~2"
ant -e -f %OL_HOME%\bin\build.xml -Dol.home=%OL_HOME% -Dbasedir=. %COMMAND% %ANT_ARGS%