mirror of
https://github.com/zxing/zxing.git
synced 2024-11-14 06:54:07 -08:00
44f46dee34
git-svn-id: https://zxing.googlecode.com/svn/trunk@2643 59b500cc-1b3d-0410-9834-0bbf25fbcc57
97 lines
3.5 KiB
XML
97 lines
3.5 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
* Copyright 2011 ZXing authors.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
-->
|
|
<project name="ZXing" default="build" basedir="../">
|
|
<property environment="env" />
|
|
<property file="${basedir}/build.properties.local" />
|
|
<property file="${basedir}/../build.properties"/>
|
|
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
|
|
<property name="dist" location="${basedir}/core/bin" />
|
|
<property name="src" location="${basedir}/core/src" />
|
|
<property name="test" location="${basedir}/core/test" />
|
|
<property name="assets" location="${basedir}/../core/test/data" />
|
|
<property name="libs" location="${basedir}/core/libs" />
|
|
<property name="output" location="${basedir}/core/bin/output" />
|
|
<property name="report" location="${basedir}/core/bin/report" />
|
|
|
|
<fail unless="FLEX_HOME"
|
|
message="Error: define FLEX_HOME env. var. with a path to Flex4 SDK" />
|
|
<fail unless="version"
|
|
message="Error: version is undefined." />
|
|
|
|
<property name="libraryName" value="zxing-${version}.swc" />
|
|
|
|
<taskdef resource="flexTasks.tasks"
|
|
classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
|
|
<taskdef resource="flexUnitTasks.tasks"
|
|
classpath="${libs}/flexUnitTasks-4.1.0-8.jar" />
|
|
|
|
<target name="clean">
|
|
<delete>
|
|
<fileset dir="${dist}" includes="**/${libraryName}"/>
|
|
</delete>
|
|
</target>
|
|
|
|
<target name="init">
|
|
<mkdir dir="${dist}"/>
|
|
</target>
|
|
|
|
<target name="build" depends="init">
|
|
<fileset id="srcFiles" dir="${src}">
|
|
<include name="**/*.as"/>
|
|
</fileset>
|
|
<pathconvert property="classes" pathsep="," refid="srcFiles">
|
|
<chainedmapper>
|
|
<globmapper from="${src}/*" to="*"></globmapper>
|
|
<mapper type="package" from="*.as" to="*"/>
|
|
</chainedmapper>
|
|
</pathconvert>
|
|
<compc output="${dist}/${libraryName}" include-classes="${classes}">
|
|
<source-path path-element="${src}"/>
|
|
<include-sources dir="${basedir}/core/src" includes="*" />
|
|
</compc>
|
|
</target>
|
|
|
|
<target name="compile.tests" depends="build">
|
|
<mxmlc file="${test}/com/google/zxing/testrunner/ZXingTestsRunner.mxml"
|
|
output="${output}/ZXingTestsRunner.swf"
|
|
debug="true">
|
|
<library-path dir="${dist}" append="true">
|
|
<include name="*.swc"/>
|
|
</library-path>
|
|
<library-path dir="${libs}" append="true">
|
|
<include name="*.swc"/>
|
|
</library-path>
|
|
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
|
|
<include name="*.swc"/>
|
|
</library-path>
|
|
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
|
|
<include name="framework.swc"/>
|
|
</library-path>
|
|
<source-path path-element="${test}" />
|
|
<source-path path-element="${assets}" />
|
|
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
|
|
<compiler.headless-server>true</compiler.headless-server>
|
|
</mxmlc>
|
|
<copy todir="${output}">
|
|
<fileset dir="${test}/com/google/zxing/testrunner">
|
|
<include name="zxing*.xml" />
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
</project>
|