<!-- :mode=xml:folding=none: -->
<project name="build.properties">
    <tstamp/>
    <property name="app.name" value="flyingsaucer"/>
    <property name="user.overrides"
              location="${user.home}/.${app.name}/${app.name}.build.properties"/>
    <property name="project.overrides" location="build.properties"/>
    <property file="${user.overrides}"/>
    <property file="${project.overrides}"/>

    <target name="properties">
        <tstamp/>
        <available file="${user.overrides}" property="user.overrides.available"/>
        <available file="${project.overrides}" property="project.overrides.available"/>
        <echo message="Loading any properties found in '${user.overrides}'"/>
        <echo message="Loading any properties found in '${project.overrides}'"/>
    </target>

    <!--
     PROJECT PROPERTIES

     These are safe defaults. For sharing new settings with the team, modify
     build.properties.

     For making changes only visible to your machine, modify
       ${user.home}/.flyingsaucer/flyingsaucer.build.properties
     -->
    <!-- Directories -->
    <property name="libraries.dir" location="lib"/>
    <property name="libraries.dev.dir" location="lib/dev"/>
    <property name="src.dir" location="src"/>
    <property name="doc.dir" location="doc"/>
    <property name="src.junit-test.java.dir" location="${src.dir}/junit"/>
    <property name="src.browser.java.dir" location="demos/browser/src/java"/>
    <property name="src.browser.icons.dir" location="demos/browser/src/icons"/>
    <property name="src.svg.java.dir" location="demos/svg/src/java"/>
    <property name="src.docbook.java.dir" location="demos/docbook/src/java"/>
    <property name="src.blower.java.dir" location="${src.java.dir}"/>
    <property name="src.about.java.dir" location="demos/about/src/java"/>
    <property name="src.samples.java.dir" location="demos/samples/src"/>
    <property name="dest.dir" location="build"/>
    <property name="dest.javadoc.full.dir" location="${doc.dir}/full/api"/>
    <property name="dest.javadoc.user.dir" location="${doc.dir}/user/api"/>
    <property name="dest.java2html.dir" location="${doc.dir}/full/code"/>
    <property name="src.java.dir" location="${src.dir}/java"/>
    <property name="dest.java.dir" location="${dest.dir}/classes"/>
    <property name="src.resources.css.dir" location="${src.dir}/css"/>
    <property name="dest.resources.css.dir" location="${dest.java.dir}/resources/css"/>
    <property name="src.resources.conf.dir" location="${src.dir}/conf"/>
    <property name="dest.resources.conf.dir" location="${dest.java.dir}/resources/conf"/>
    <property name="src.resources.schema.dir" location="${src.dir}/schema"/>
    <property name="dest.resources.schema.dir" location="${dest.java.dir}/resources/schema"/>
    <property name="src.packaging.dir" location="${src.dir}/packaging"/>
    <property name="src.demo.xhtml.dir" location="demos/browser/xhtml"/>
    <property name="src.demo.svg.dir" location="demos/svg/xhtml"/>
    <property name="src.demo.docbook.dir" location="demos/docbook"/>
    <property name="src.demo.splash.dir" location="demos/splash"/>
    <property name="src.about.xhtml.dir" location="demos/about/xhtml"/>
    <property name="www.dir" location="www"/>
    <property name="regress.source.dir" location="tests/regress/xhtml"/>
    <property name="regress.target.zip" location="tests/regress/snapshots/regress-output-${app.version}.zip"/>
    <property name="regress.verify.dir" location="tests/regress/verify/reference"/>
    <property name="regress.temp.dir" location="tests/regress/temp"/>
    <property name="regress.verify.failed.dir" location="tests/regress/verify/failed"/>

    <property name="src.log4j.dir" location="${src.dir}/log4j"/>
    <property name="lib.log4j" location="../StaticJars/log4j-1_2_8.jar"/>

    <property name="nb_profile" location="nb_profile"/>
    <property name="guide" location="doc/guide"/>
    <property name="dist.dir" location="dist"/>

    <!-- Compiler flags -->
    <!-- For details on each flag, see http://ant.apache.org/manual/CoreTasks/javac.html -->
    <property name="build.compiler" value="modern"/>
    <property name="compiler.debug" value="true"/>
    <property name="compiler.debuglevel" value="lines,vars,source"/>
    <property name="compiler.deprecation" value="off"/>
    <property name="compiler.failonerror" value="true"/>
    <property name="compiler.fork" value="no"/>
    <property name="compiler.listfiles" value="no"/>
    <property name="compiler.nowarn" value="off"/>
    <property name="compiler.optimize" value="off"/>
    <property name="compiler.source" value="1.4"/>
    <property name="compiler.target" value="1.4"/>
    <property name="compiler.verbose" value="no"/>

    <!-- Java.exe flags -->
    <property name="java-exec.fork.tests" value="true"/>

    <!-- path reference for all JAR files in /lib -->
    <path id="run.classpath">
        <pathelement path="${dest.java.dir}"/>
    </path>

    <path id="debug.sourcepath">
        <fileset dir="${src.java.dir}/">

        </fileset>
    </path>

    <!-- path reference for all JAR files in /lib -->
    <path id="libraries.all">
        <fileset dir="${libraries.dir}">
            <include name="*.jar"/>
        </fileset>
    </path>

    <path id="libraries.compile">
        <path refid="libraries.all"/>
        <fileset dir="${libraries.dev.dir}">
            <include name="svgSalamander.jar"/>
        </fileset>
    </path>

    <!-- path reference for all JAR files in /lib, plus all our built jars -->
    <path id="libraries-and-dest.all">
        <path refid="libraries.all"/>
        <fileset dir="${dest.dir}">
            <include name="*.jar"/>
        </fileset>
    </path>

    <!-- path reference for all JAR files in /lib, plus all our built jars -->
    <path id="libraries-and-dest-svg.all">
        <path refid="libraries-and-dest.all"/>
        <fileset dir="${libraries.dev.dir}">
            <include name="svgSalamander.jar"/>
        </fileset>
    </path>

    <patternset id="org-java-files">
        <include name="org/xhtmlrenderer/**"/>
    </patternset>

    <patternset id="user-java-files">
        <!--
      <includesfile name="src/java/org/xhtmlrenderer/simple/XHTMLPanel.java"/>
      -->
        <include name="org/xhtmlrenderer/simple/**"/>
    </patternset>

    <patternset id="xhtml-files">
        <include name="**"/>
        <include name="fonts/**"/>
    </patternset>

    <patternset id="xhtml-about-files">
        <include name="*.xhtml"/>
        <include name="*.gif"/>
        <include name="*.jpg"/>
        <include name="*.png"/>
    </patternset>

    <!-- zip file reference for all XHTML in the demos directory, and supporting files -->
    <zipfileset id="xhtml.demos" dir="${src.demo.xhtml.dir}" prefix="demos/">
        <patternset refid="xhtml-files"/>
    </zipfileset>

    <zipfileset id="xhtml.svg" dir="${src.demo.svg.dir}" prefix="svg/">
        <include name="**/*.css"/>
        <include name="*.xhtml"/>
        <include name="*.gif"/>
        <include name="*.jpg"/>
        <include name="*.png"/>
        <include name="dat/**"/>
    </zipfileset>

    <zipfileset id="files.docbook" dir="${src.demo.docbook.dir}" prefix="docbook/">
        <include name="xhtml/*"/>
        <include name="xml/*"/>
        <exclude name="dtd/*"/>
        <include name="wysiwygdocbook1.01/**"/>
        <include name="docbook-css-0.4/**"/>
        <include name="other-css/**"/>
        <include name="MozBook/**"/>
        <include name="xmlmind/**"/>
    </zipfileset>

    <zipfileset id="xhtml.about.demos" dir="${src.about.xhtml.dir}" prefix="demos/">
        <patternset refid="xhtml-about-files"/>
    </zipfileset>

    <!-- zip file reference for all splash XHTML in the demos directory, and supporting files -->
    <zipfileset id="xhtml.splash" dir="${src.demo.splash.dir}" prefix="demos/splash">
        <include name="*.html"/>
        <include name="images/**"/>
    </zipfileset>

    <target name="check.app.version">
        <fail message="Need property app.version, specify with -Dapp.version">
            <condition>
                <not>
                    <isset property="app.version"/>
                </not>
            </condition>
        </fail>
    </target>

    <path id="xilize.path" path="">
        <pathelement path="${libraries.dev.dir}/xilize-engine.jar" />
        <pathelement path="${libraries.dev.dir}/bsh-core-2.0b4.jar" />
    </path>
</project>
