Build our Flash libraries like we build our Java libraries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4935 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<property file="build.properties"/>
|
||||
|
||||
<!-- configuration parameters -->
|
||||
<property name="app.name" value="narya"/>
|
||||
<property name="lib.name" value="narya"/>
|
||||
<property name="deploy.dir" value="dist"/>
|
||||
<property name="savedoc.dir" value="docs"/>
|
||||
<property name="javadoc.home" value="${deploy.dir}/docs"/>
|
||||
@@ -52,8 +52,7 @@
|
||||
</dobj>
|
||||
</target>
|
||||
|
||||
<!-- generates marshaller and dispatcher classes for all invocation -->
|
||||
<!-- service declarations -->
|
||||
<!-- generates marshaller and dispatcher classes for all invocation service declarations -->
|
||||
<target name="genservice">
|
||||
<taskdef name="service" classpathref="classpath"
|
||||
classname="com.threerings.presents.tools.GenServiceTask"/>
|
||||
@@ -84,8 +83,7 @@
|
||||
</service>
|
||||
</target>
|
||||
|
||||
<!-- generates sender and decoder classes for all invocation -->
|
||||
<!-- receiver declarations -->
|
||||
<!-- generates sender and decoder classes for all invocation receiver declarations -->
|
||||
<target name="genreceiver">
|
||||
<taskdef name="receiver" classpathref="classpath"
|
||||
classname="com.threerings.presents.tools.GenReceiverTask"/>
|
||||
@@ -137,7 +135,7 @@
|
||||
<fileset dir="src/java" includes="**/*.tmpl"/>
|
||||
</copy>
|
||||
<copy todir="${deploy.dir}/lib" flatten="true">
|
||||
<fileset refid="${app.name}.libs"/>
|
||||
<fileset refid="${lib.name}.libs"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
@@ -146,6 +144,7 @@
|
||||
<delete dir="${deploy.dir}/classes"/>
|
||||
<delete dir="${deploy.dir}/docs"/>
|
||||
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.jar"/></delete>
|
||||
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.swc"/></delete>
|
||||
</target>
|
||||
|
||||
<!-- wipes the entire build directory clean -->
|
||||
@@ -168,6 +167,36 @@
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<!-- checks whether our Flash library needs building -->
|
||||
<target name="checkaslib">
|
||||
<condition property="no_build_aslib"><or>
|
||||
<not><available file="${flexsdk.dir}/lib/compc.jar"/></not>
|
||||
<uptodate targetfile="${deploy.dir}/${lib.name}.swc">
|
||||
<srcfiles dir="src/as" includes="**/*.as"/>
|
||||
</uptodate>
|
||||
</or></condition>
|
||||
</target>
|
||||
|
||||
<!-- builds our Flash library -->
|
||||
<target name="aslib" unless="no_build_aslib" depends="checkaslib">
|
||||
<copy file="etc/aslib-config.xml.in" tofile="${deploy.dir}/aslib-config.xml">
|
||||
<filterset>
|
||||
<filter token="flex_sdk_dir" value="${flexsdk.dir}"/>
|
||||
<filter token="lib_name_dir" value="${lib.name}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
<java jar="${flexsdk.dir}/lib/compc.jar" fork="true" failonerror="true">
|
||||
<arg value="-load-config"/>
|
||||
<arg value="${deploy.dir}/aslib-config.xml"/>
|
||||
<arg value="-compiler.optimize"/>
|
||||
<arg value="-compiler.source-path=src/as/"/>
|
||||
<arg value="-include-sources=src/as/"/>
|
||||
<arg value="-output"/>
|
||||
<arg value="${deploy.dir}/${lib.name}.swc"/>
|
||||
</java>
|
||||
<delete file="${deploy.dir}/aslib-config.xml"/>
|
||||
</target>
|
||||
|
||||
<!-- build the native libraries -->
|
||||
<condition property="isunix"><os family="unix"/></condition>
|
||||
<target name="ninstall" depends="prepare" if="isunix">
|
||||
@@ -209,29 +238,29 @@
|
||||
</target>
|
||||
|
||||
<!-- a target for rebuilding everything -->
|
||||
<target name="all" depends="clean,prepare,compile,ninstall,javadoc,tests,dist"/>
|
||||
<target name="all" depends="clean,prepare,compile,aslib,ninstall,javadoc,tests,dist"/>
|
||||
|
||||
<!-- builds our distribution files (war and jar) -->
|
||||
<target name="dist" depends="prepare,compile,procstream,ninstall,tests">
|
||||
<target name="dist" depends="prepare,compile,procstream,aslib,ninstall,tests">
|
||||
<!-- build our various jar files -->
|
||||
<jar destfile="${deploy.dir}/${app.name}-base.jar">
|
||||
<jar destfile="${deploy.dir}/${lib.name}-base.jar">
|
||||
<fileset dir="${classes.dir}" includes="com/threerings/NaryaLog**"/>
|
||||
<fileset dir="${classes.dir}" includes="com/threerings/io/**"/>
|
||||
<fileset dir="${classes.dir}" includes="com/threerings/util/**"/>
|
||||
</jar>
|
||||
<jar destfile="${deploy.dir}/${app.name}-distrib.jar">
|
||||
<jar destfile="${deploy.dir}/${lib.name}-distrib.jar">
|
||||
<fileset dir="${classes.dir}" includes="com/threerings/presents/**"/>
|
||||
<fileset dir="${classes.dir}" includes="com/threerings/crowd/**"/>
|
||||
<fileset dir="${classes.dir}" includes="com/threerings/admin/**"/>
|
||||
</jar>
|
||||
<jar destfile="${deploy.dir}/${app.name}-tests.jar">
|
||||
<jar destfile="${deploy.dir}/${lib.name}-tests.jar">
|
||||
<fileset dir="tests/${classes.dir}" includes="com/threerings/**"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- various bits used by the retroweaver tasks -->
|
||||
<property name="inpre" value="${deploy.dir}/${app.name}"/>
|
||||
<property name="outpre" value="${deploy.dir}/retro/${app.name}"/>
|
||||
<property name="inpre" value="${deploy.dir}/${lib.name}"/>
|
||||
<property name="outpre" value="${deploy.dir}/retro/${lib.name}"/>
|
||||
|
||||
<!-- a helper task for 'retro' -->
|
||||
<target name="vweave">
|
||||
@@ -288,23 +317,23 @@
|
||||
<!-- creates a zipfile with our source distribution -->
|
||||
<target name="snapshot">
|
||||
<echo message="You may want to stop and run 'ant savedoc' first."/>
|
||||
<delete file="${deploy.dir}/${app.name}-snapshot.zip"/>
|
||||
<mkdir dir="${deploy.dir}/snapshot/${app.name}"/>
|
||||
<copy todir="${deploy.dir}/snapshot/${app.name}">
|
||||
<delete file="${deploy.dir}/${lib.name}-snapshot.zip"/>
|
||||
<mkdir dir="${deploy.dir}/snapshot/${lib.name}"/>
|
||||
<copy todir="${deploy.dir}/snapshot/${lib.name}">
|
||||
<fileset dir=".">
|
||||
<include name="**"/>
|
||||
<exclude name="dist/**"/>
|
||||
<exclude name="tests/dist/**"/>
|
||||
<exclude name="${app.name}-*.zip"/>
|
||||
<exclude name="${lib.name}-*.zip"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${deploy.dir}/snapshot/${app.name}/lib">
|
||||
<copy todir="${deploy.dir}/snapshot/${lib.name}/lib">
|
||||
<fileset dir="${deploy.dir}/lib" includes="*.jar"/>
|
||||
</copy>
|
||||
<copy todir="${deploy.dir}/snapshot/${app.name}/docs/api">
|
||||
<copy todir="${deploy.dir}/snapshot/${lib.name}/docs/api">
|
||||
<fileset dir="${deploy.dir}/docs" includes="**"/>
|
||||
</copy>
|
||||
<zip destfile="${deploy.dir}/${app.name}-snapshot.zip" basedir="${deploy.dir}/snapshot"/>
|
||||
<zip destfile="${deploy.dir}/${lib.name}-snapshot.zip" basedir="${deploy.dir}/snapshot"/>
|
||||
<delete dir="${deploy.dir}/snapshot"/>
|
||||
</target>
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<flex-config>
|
||||
<compiler>
|
||||
<accessible>false</accessible>
|
||||
<show-actionscript-warnings>true</show-actionscript-warnings>
|
||||
<debug>false</debug>
|
||||
<external-library-path>
|
||||
<path-element>@flex_sdk_dir@/frameworks/libs/playerglobal.swc</path-element>
|
||||
<path-element>@flex_sdk_dir@/frameworks/libs</path-element>
|
||||
<path-element>dist/lib</path-element>
|
||||
</external-library-path>
|
||||
<keep-generated-actionscript>false</keep-generated-actionscript>
|
||||
<library-path>
|
||||
</library-path>
|
||||
<namespaces>
|
||||
<namespace>
|
||||
<uri>http://www.adobe.com/2006/mxml</uri>
|
||||
<manifest>@flex_sdk_dir@/frameworks/mxml-manifest.xml</manifest>
|
||||
</namespace>
|
||||
</namespaces>
|
||||
<optimize>false</optimize>
|
||||
<show-binding-warnings>true</show-binding-warnings>
|
||||
<show-deprecation-warnings>true</show-deprecation-warnings>
|
||||
<strict>true</strict>
|
||||
<as3>true</as3>
|
||||
<es>false</es>
|
||||
<verbose-stacktraces>true</verbose-stacktraces>
|
||||
<fonts>
|
||||
<max-cached-fonts>20</max-cached-fonts>
|
||||
<max-glyphs-per-face>1000</max-glyphs-per-face>
|
||||
<managers>
|
||||
<manager-class>flash.fonts.JREFontManager</manager-class>
|
||||
<manager-class>flash.fonts.BatikFontManager</manager-class>
|
||||
</managers>
|
||||
<local-fonts-snapshot>@flex_sdk_dir@/frameworks/localFonts.ser</local-fonts-snapshot>
|
||||
</fonts>
|
||||
<warn-array-tostring-changes>false</warn-array-tostring-changes>
|
||||
<warn-assignment-within-conditional>true</warn-assignment-within-conditional>
|
||||
<warn-bad-array-cast>true</warn-bad-array-cast>
|
||||
<warn-bad-bool-assignment>true</warn-bad-bool-assignment>
|
||||
<warn-bad-date-cast>true</warn-bad-date-cast>
|
||||
<warn-bad-es3-type-method>true</warn-bad-es3-type-method>
|
||||
<warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
|
||||
<warn-bad-nan-comparison>true</warn-bad-nan-comparison>
|
||||
<warn-bad-null-assignment>true</warn-bad-null-assignment>
|
||||
<warn-bad-null-comparison>true</warn-bad-null-comparison>
|
||||
<warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
|
||||
<warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
|
||||
<warn-changes-in-resolve>false</warn-changes-in-resolve>
|
||||
<warn-class-is-sealed>true</warn-class-is-sealed>
|
||||
<warn-const-not-initialized>true</warn-const-not-initialized>
|
||||
<warn-constructor-returns-value>true</warn-constructor-returns-value>
|
||||
<warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
|
||||
<warn-deprecated-function-error>false</warn-deprecated-function-error>
|
||||
<warn-deprecated-property-error>false</warn-deprecated-property-error>
|
||||
<warn-duplicate-argument-names>true</warn-duplicate-argument-names>
|
||||
<warn-duplicate-variable-def>true</warn-duplicate-variable-def>
|
||||
<warn-for-var-in-changes>false</warn-for-var-in-changes>
|
||||
<warn-import-hides-class>true</warn-import-hides-class>
|
||||
<warn-instance-of-changes>true</warn-instance-of-changes>
|
||||
<warn-internal-error>true</warn-internal-error>
|
||||
<warn-level-not-supported>false</warn-level-not-supported>
|
||||
<warn-missing-namespace-decl>true</warn-missing-namespace-decl>
|
||||
<warn-negative-uint-literal>true</warn-negative-uint-literal>
|
||||
<warn-no-constructor>false</warn-no-constructor>
|
||||
<warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
|
||||
<warn-no-type-decl>true</warn-no-type-decl>
|
||||
<warn-number-from-string-changes>false</warn-number-from-string-changes>
|
||||
<warn-scoping-change-in-this>false</warn-scoping-change-in-this>
|
||||
<warn-slow-text-field-addition>true</warn-slow-text-field-addition>
|
||||
<warn-unlikely-function-value>true</warn-unlikely-function-value>
|
||||
<warn-xml-class-has-changed>false</warn-xml-class-has-changed>
|
||||
</compiler>
|
||||
<use-network>true</use-network>
|
||||
<metadata>
|
||||
<title>@lib_name@ library</title>
|
||||
<description>http://www.threerings.net/code/@lib_name@/</description>
|
||||
<publisher>Three Rings, Inc.</publisher>
|
||||
<creator>Three Rings, Inc.</creator>
|
||||
<language>EN</language>
|
||||
</metadata>
|
||||
</flex-config>
|
||||
Reference in New Issue
Block a user