
<project name="build.demo-apps">
    <!-- Builds and jars the browser demo, and runs it -->
	<target name="browser" depends="jar.browser">
		<java classname="org.xhtmlrenderer.demo.browser.BrowserStartup"
				fork="${java-exec.fork.tests}">
			<classpath refid="libraries-and-dest.all"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
			<sysproperty key="sun.java2D.opengl" value="True"/>
			<sysproperty key="java.protocol.handler.pkgs" value="org.xhtmlrenderer.protocols"/>
		</java>
	</target>

	<target name="browser-ws" depends="jar.browser">
		<java classname="org.xhtmlrenderer.demo.browser.BrowserSandboxLauncher"
				fork="${java-exec.fork.tests}">
			<classpath refid="libraries-and-dest.all"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
			<sysproperty key="sun.java2D.opengl" value="true"/>
			<sysproperty key="java.protocol.handler.pkgs" value="org.xhtmlrenderer.protocols"/>
		</java>
	</target>

    <!-- Builds and jars the SVG demo, and runs it -->
	<target name="svg" depends="jar.svg">
		<java classname="org.xhtmlrenderer.demo.svg.ShowSVGPage"
				fork="${java-exec.fork.tests}">
			<classpath refid="libraries-and-dest-svg.all"/>
            <arg value="/svg/svg.xhtml"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
			<sysproperty key="sun.java2D.opengl" value="true"/>
		</java>
	</target>

    <!-- Builds and jars the DocBook demo, and runs it -->
	<target name="docbook" depends="jar.docbook">
		<java classname="org.xhtmlrenderer.demo.docbook.ShowDocBookPage"
				fork="${java-exec.fork.tests}">
			<classpath refid="libraries-and-dest.all"/>
            <arg value="/docbook/xml/plugin-implement.xml"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
			<sysproperty key="sun.java2D.opengl" value="true"/>
		</java>
	</target>

    <!-- Builds and jars the browser demo, and runs it with a particular page -->
	<target name="view.page" depends="jar.browser">
		<java classname="org.xhtmlrenderer.demo.browser.BrowserStartup"
				fork="${java-exec.fork.tests}">
			<arg value="${page}"/>
			<classpath refid="libraries-and-dest.all"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
			<sysproperty key="sun.java2D.opengl" value="true"/>
		</java>
	</target>

    <!-- Builds and jars the browser demo, and runs it with a particular page -->
	<target name="create.pdf" depends="jar">
		<java classname="org.xhtmlrenderer.simple.PDFRenderer"
				fork="${java-exec.fork.tests}">
			<arg value="${page}"/>
			<arg value="${pdf}"/>
			<classpath refid="libraries-and-dest.all"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
		</java>
	</target>

	<!-- Builds and jars the about box demo, and runs it -->
	<target name="aboutbox" depends="jar">
		<java classname="org.xhtmlrenderer.demo.aboutbox.AboutBox"
				fork="${java-exec.fork.tests}">
			<classpath refid="libraries-and-dest.all"/>
			<sysproperty key="show-config" value="${show-config}"/>
			<syspropertyset>
				<propertyref prefix="xr."/>
			</syspropertyset>
		</java>
	</target>
</project>
