Skip to content

Commit

Permalink
Updated build system to (finally) support the AIR target.
Browse files Browse the repository at this point in the history
  • Loading branch information
ekovac committed Apr 8, 2015
1 parent 4a7b5d5 commit 3092a13
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 9 deletions.
12 changes: 11 additions & 1 deletion build.properties
@@ -1,8 +1,17 @@
DEBUG=false
LOCALE=en_US

FLEX_HOME=${env.FLEX_HOME}
FLEX_LIBS=${FLEX_HOME}/frameworks/libs

AIR_HOME=${env.AIR_HOME}
AIR_LIBS=${AIR_HOME}/frameworks/libs
ADT_JAR=${AIR_HOME}/lib/adt.jar

AIR_CERT=${env.AIR_CERT}
AIR_CERT_PASS=${env.AIR_CERT_PASS}

WEAVE_DESTROOT=${basedir}/ROOT
LOCALE=en_US

FRAMEWORK_SWF=framework_4.5.1.21489.swf
RPC_SWF=rpc_4.5.1.21328.swf
Expand All @@ -19,5 +28,6 @@ EXAMPLEPLUGIN=WeaveExamplePlugin
FONTS=WeaveFonts
CLIENT=WeaveClient
ADMIN=WeaveAdmin
DESKTOP=WeaveDesktop
SERVICES=WeaveServices
SERVLETUTILS=WeaveServletUtils
56 changes: 48 additions & 8 deletions build.xml
Expand Up @@ -26,16 +26,46 @@

<target name="dist" depends="build">
<zip destfile="weave.zip">
<zipfileset dir="${WEAVE_DESTROOT}" prefix="ROOT"/>
<zipfileset dir="${WEAVE_DESTROOT}" prefix="ROOT" excludes="${DESKTOP}.swf ${DESKTOP}.air *.png defaults.xml"/>
<zipfileset file="${basedir}/WeaveServices.war"/>
</zip>
</target>

<target name="deploy_war">
<zip destfile="weave.zip">
<zipfileset dir="${WEAVE_DESTROOT}" prefix="ROOT"/>
<zipfileset file="${basedir}/WeaveServices.war"/>
</zip>

<target name="air" depends="build">
<copy todir="${WEAVE_DESTROOT}">
<fileset dir="${DESKTOP}/src/">
<include name="*.png"/>
</fileset>
<fileset dir="${CLIENT}/configurations">
<include name="defaults.xml"/>
</fileset>
</copy>
<path id="FILE-LIST">
<fileset dir="${WEAVE_DESTROOT}">
<include name="*" />
<exclude name="${CLIENT}.swf"/>
<exclude name="${DESKTOP}.air"/>
</fileset>
</path>
<pathconvert pathsep=" " property="FILE-LIST.csv"
refid="FILE-LIST"/>
<java
jar ="${ADT_JAR}"
fork = "true"
dir ="${WEAVE_DESTROOT}"
failonerror="true">
<arg value="-package"/>
<arg value="-storetype"/>
<arg value="pkcs12"/>
<arg value="-keystore"/>
<arg value="${AIR_CERT}"/>
<arg value="-storepass"/>
<arg value="${AIR_CERT_PASS}"/>
<arg value="${DESKTOP}"/>
<arg value="${basedir}/${DESKTOP}/src/WeaveDesktop-app.xml"/>
<arg line="${FILE-LIST.csv}"/>
<!-- <arg value="icons/*.png"/> -->
</java>
</target>

<target name="install" depends="build">
Expand All @@ -46,6 +76,10 @@
<include name="*.html"/>
<include name="*.js"/>
<include name="*.css"/>
<exclude name="${DESKTOP}.swf"/>
<exclude name="${DESKTOP}.air"/>
<exclude name="*.png"/>
<exclude name="defaults.xml"/>
</fileset>
</copy>
<copy todir="${WEAVE_DOCROOT}/../">
Expand All @@ -57,7 +91,7 @@

<!-- This target will extract the swf files from the swc archives
and extract them to the WEAVE_DESTROOT -->
<target name="build" depends="client, admin, uispark, ui, data, core, api, services, exampleplugin">
<target name="build" depends="client, desktop, admin, uispark, ui, data, core, api, services, exampleplugin">
<mkdir dir="${WEAVE_DESTROOT}"/>
<build-html-wrapper project="${CLIENT}" swf="weave" title="Weave"/>
<build-html-wrapper project="${ADMIN}" swf="AdminConsole" title="Weave Admin Console"/>
Expand All @@ -71,6 +105,7 @@
<copy file="${basedir}/${CLIENT}/src/weaveStyle.css" tofile="${WEAVE_DESTROOT}/weaveStyle.css"/>
<copy file="${basedir}/${CLIENT}/html-template/playerProductInstall.swf" tofile="${WEAVE_DESTROOT}/playerProductInstall.swf"/>
<copy file="${basedir}/${CLIENT}/html-template/swfobject.js" tofile="${WEAVE_DESTROOT}/swfobject.js"/>
<copy file="${basedir}/${DESKTOP}/bin/${DESKTOP}.swf" tofile="${WEAVE_DESTROOT}/${DESKTOP}.swf"/>
<copy file="${basedir}/${ADMIN}/bin/AdminConsole.swf" tofile="${WEAVE_DESTROOT}/AdminConsole.swf"/>
<copy file="${basedir}/${UI}/src/weave/visualization/tools/CytoscapeWebPopout.html" tofile="${WEAVE_DESTROOT}/CytoscapeWebPopout.html"/>
<copy file="${basedir}/${SERVICES}/bin/${SERVICES}.war" tofile="${basedir}/${SERVICES}.war"/>
Expand Down Expand Up @@ -104,6 +139,9 @@
<target name="admin" depends="ui">
<buildproject targetproject="${ADMIN}" targetfileext="swf"/>
</target>
<target name="desktop" depends="ui">
<buildproject targetproject="${DESKTOP}" targetfileext="swf"/>
</target>
<target name="servletutils">
<ant dir="${basedir}/${SERVLETUTILS}" target="build"/>
</target>
Expand All @@ -114,6 +152,7 @@
<ant dir="${basedir}/${SERVICES}" target="dist"/>
</target>


<!-- This target calls the clean targets of each project's build file -->
<target name="clean">
<echo message="Cleaning all projects..."/>
Expand All @@ -122,6 +161,7 @@
<fileset file="${basedir}/weave.zip"/>
</delete>
<ant dir="${basedir}/${CLIENT}" target="clean" />
<ant dir="${basedir}/${DESKTOP}" target="clean" />
<ant dir="${basedir}/${ADMIN}" target="clean" />
<ant dir="${basedir}/${API}" target="clean" />
<ant dir="${basedir}/${CORE}" target="clean" />
Expand Down

0 comments on commit 3092a13

Please sign in to comment.