149 lines
5.6 KiB
XML
Executable File
149 lines
5.6 KiB
XML
Executable File
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="BigBlueButton Client Check"
|
|
basedir="."
|
|
default="build">
|
|
<property environment="env"/>
|
|
<property name="FLEX_HOME"
|
|
value="${env.FLEX_HOME}"/>
|
|
<property name="BASE_DIR"
|
|
value="${basedir}"/>
|
|
<property name="SRC_DIR"
|
|
value="${BASE_DIR}/src"/>
|
|
<property name="TEST_IMAGE_URL" value="http://upload.wikimedia.org/wikipedia/commons/0/0a/Keswick,_Cumbria_Panorama_1_-_June_2009.jpg" />
|
|
<property name="OUTPUT_DIR"
|
|
value="check"/>
|
|
<property name="TEST_IMAGE_PATH"
|
|
value="${OUTPUT_DIR}/test_image.jpg"/>
|
|
<taskdef resource="flexTasks.tasks"
|
|
classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
|
|
<macrodef name="create-rsl">
|
|
<attribute name="rsl-dir"/>
|
|
<attribute name="swc-dir"/>
|
|
<attribute name="swc-name"/>
|
|
<sequential>
|
|
<unzip src="@{swc-dir}/@{swc-name}.swc"
|
|
dest="@{rsl-dir}">
|
|
<patternset>
|
|
<include name="library.swf"/>
|
|
</patternset>
|
|
</unzip>
|
|
<move file="@{rsl-dir}/library.swf"
|
|
tofile="@{rsl-dir}/@{swc-name}.swf"/>
|
|
</sequential>
|
|
</macrodef>
|
|
<target name="Extract-rsls">
|
|
<!-- Third parties RSLs -->
|
|
<create-rsl rsl-dir="check/rsls/"
|
|
swc-dir="${BASE_DIR}/libs/"
|
|
swc-name="robotlegs-framework-v2.2.1"/>
|
|
<create-rsl rsl-dir="check/rsls/"
|
|
swc-dir="${BASE_DIR}/libs/"
|
|
swc-name="as3-signals-v0.9-BETA"/>
|
|
<create-rsl rsl-dir="check/rsls/"
|
|
swc-dir="${BASE_DIR}/libs/"
|
|
swc-name="as3-signals-utilities-async-v0.9-BETA"/>
|
|
<create-rsl rsl-dir="check/rsls/"
|
|
swc-dir="${BASE_DIR}/libs/"
|
|
swc-name="robotlegs-extensions-SignalCommandMap-v1.0.0b1"/>
|
|
<create-rsl rsl-dir="check/rsls/"
|
|
swc-dir="${BASE_DIR}/libs/"
|
|
swc-name="localelib"/>
|
|
</target>
|
|
<target name="Compile-Release"
|
|
description="Compile MXML file to release SWF application.">
|
|
<echo>Compiling source...</echo>
|
|
<mxmlc file="${SRC_DIR}/BBBClientCheck.mxml"
|
|
output="check/BBBClientCheck.swf"
|
|
debug="false"
|
|
locale="en_US"
|
|
actionscript-file-encoding="UTF-8"
|
|
incremental="false">
|
|
<static-link-runtime-shared-libraries>false</static-link-runtime-shared-libraries>
|
|
<source-path>locale/{locale}</source-path>
|
|
<source-path path-element="src"/>
|
|
<include-resource-bundles>resources</include-resource-bundles>
|
|
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
|
|
<keep-as3-metadata name="Inject"/>
|
|
<keep-as3-metadata name="PostConstruct"/>
|
|
<runtime-shared-library-path path-element="${BASE_DIR}/libs/robotlegs-framework-v2.2.1.swc">
|
|
<url rsl-url="rsls/robotlegs-framework-v2.2.1.swf"/>
|
|
</runtime-shared-library-path>
|
|
<runtime-shared-library-path path-element="${BASE_DIR}/libs/localelib.swc">
|
|
<url rsl-url="rsls/localelib.swf"/>
|
|
</runtime-shared-library-path>
|
|
<runtime-shared-library-path path-element="${BASE_DIR}/libs/as3-signals-v0.9-BETA.swc">
|
|
<url rsl-url="rsls/as3-signals-v0.9-BETA.swf"/>
|
|
</runtime-shared-library-path>
|
|
<runtime-shared-library-path path-element="${BASE_DIR}/libs/robotlegs-extensions-SignalCommandMap-v1.0.0b1.swc">
|
|
<url rsl-url="rsls/robotlegs-extensions-SignalCommandMap-v1.0.0b1.swf"/>
|
|
</runtime-shared-library-path>
|
|
<runtime-shared-library-path path-element="${BASE_DIR}/libs/as3-signals-utilities-async-v0.9-BETA.swc">
|
|
<url rsl-url="rsls/as3-signals-utilities-async-v0.9-BETA.swf"/>
|
|
</runtime-shared-library-path>
|
|
<compiler.library-path dir="${BASE_DIR}/libs"
|
|
append="true">
|
|
<include name=".swc"/>
|
|
</compiler.library-path>
|
|
<compiler.library-path dir="${FLEX_HOME}/frameworks/libs"
|
|
append="true">
|
|
<include name=".swc"/>
|
|
</compiler.library-path>
|
|
<compiler.library-path dir="${FLEX_HOME}/frameworks/libs/mx"
|
|
append="true">
|
|
<include name=".swc"/>
|
|
</compiler.library-path>
|
|
</mxmlc>
|
|
<antcall target="Resolve-Dependency">
|
|
<param name="html.output"
|
|
value="${OUTPUT_DIR}"/>
|
|
</antcall>
|
|
</target>
|
|
<target name="Build-Release">
|
|
<antcall target="Compile-Release"/>
|
|
</target>
|
|
<target name="Resolve-Dependency"
|
|
description="Generate HTML wrapper">
|
|
<get src="${TEST_IMAGE_URL}" dest="${html.output}/test_image.jpg" skipexisting="true" />
|
|
<copy file="html-template/index.html"
|
|
tofile="${html.output}/index.html"/>
|
|
<copy file="html-template/swfobject.js"
|
|
tofile="${html.output}/swfobject.js"/>
|
|
<copy file="${SRC_DIR}/AppStyle.css"
|
|
tofile="${html.output}/AppStyle.css"/>
|
|
<copy todir="${html.output}/resources">
|
|
<fileset dir="resources"/>
|
|
</copy>
|
|
<copy todir="${html.output}/history">
|
|
<fileset dir="html-template/history"/>
|
|
</copy>
|
|
<copy todir="${html.output}/conf">
|
|
<fileset dir="conf"/>
|
|
</copy>
|
|
</target>
|
|
<target name="build"
|
|
depends="gen-config-xml, Extract-rsls, Build-Release"
|
|
description="Launcher for building whole release process"/>
|
|
|
|
<target name="get-local-ip">
|
|
<exec executable="bash" outputproperty="IP">
|
|
<arg value="-c"/>
|
|
<arg value="ifconfig | grep -v '127.0.0.1' | grep -E '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | tail -1 | cut -d: -f2 | awk '{ print $1}'"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="init">
|
|
<available file="conf/config.xml" property="config.xml.exists" />
|
|
<available file="${TEST_IMAGE_PATH}" property="test_image.exists" />
|
|
</target>
|
|
|
|
<target name="gen-config-xml" depends="init, get-local-ip" unless="${config.xml.exists}">
|
|
<copy file="resources/config.xml.template" tofile="conf/config.xml" />
|
|
<exec executable="sed">
|
|
<arg value="-i"/>
|
|
<arg value="s:HOST:${IP}:g"/>
|
|
<arg value="conf/config.xml"/>
|
|
</exec>
|
|
<echo message="config.xml generated" />
|
|
</target>
|
|
</project>
|