Build our Flash libraries.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@561 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2008-02-18 19:00:12 +00:00
parent 50025dabf6
commit a286a0c4e7
5 changed files with 137 additions and 22 deletions
+51 -21
View File
@@ -6,7 +6,7 @@
<property file="build.properties"/>
<!-- configuration parameters -->
<property name="app.name" value="vilya"/>
<property name="lib.name" value="vilya"/>
<property name="deploy.dir" value="dist"/>
<property name="savedoc.dir" value="docs"/>
@@ -16,8 +16,8 @@
<!-- import some targets to enumerate library dependencies -->
<property name="libs.dir" value="lib"/>
<import file="libs-incl.xml"/>
<import file="depends-incl.xml"/>
<import file="etc/libs-incl.xml"/>
<import file="etc/depends-incl.xml"/>
<!-- declare our classpath business -->
<path id="classpath">
@@ -147,7 +147,7 @@
<fileset dir="rsrc" includes="**/*" excludes="**/bundles/**"/>
</copy>
<copy todir="${deploy.dir}/lib" flatten="true">
<fileset refid="${app.name}.libs"/>
<fileset refid="${lib.name}.libs"/>
</copy>
</target>
@@ -183,6 +183,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>
<!-- builds the javadoc documentation -->
<target name="javadoc" depends="prepare">
<javadoc sourcepath="src/java" packagenames="com.threerings.*"
@@ -222,32 +252,32 @@
</target>
<!-- a target for rebuilding everything -->
<target name="all" depends="clean,prepare,compile,tcompile,javadoc,dist"/>
<target name="all" depends="clean,dist,javadoc,dist"/>
<!-- builds our distribution files (war and jar) -->
<target name="dist" depends="prepare,compile,tcompile,procstream">
<target name="dist" depends="prepare,compile,tcompile,procstream,aslib">
<!-- build our various jar files -->
<jar destfile="${deploy.dir}/${app.name}-parlor.jar">
<jar destfile="${deploy.dir}/${lib.name}-parlor.jar">
<fileset dir="${classes.dir}" includes="rsrc/i18n/game/**"/>
<fileset dir="${classes.dir}" includes="com/threerings/parlor/**"/>
<fileset dir="${classes.dir}" includes="com/threerings/ezgame/**"/>
</jar>
<jar destfile="${deploy.dir}/${app.name}-puzzle.jar">
<jar destfile="${deploy.dir}/${lib.name}-puzzle.jar">
<fileset dir="${classes.dir}" includes="com/threerings/puzzle/**"/>
</jar>
<jar destfile="${deploy.dir}/${app.name}-micasa.jar">
<jar destfile="${deploy.dir}/${lib.name}-micasa.jar">
<fileset dir="${classes.dir}" includes="com/threerings/micasa/**"/>
<fileset dir="${classes.dir}" includes="rsrc/**/micasa/**"/>
</jar>
<jar destfile="${deploy.dir}/${app.name}-stage.jar">
<jar destfile="${deploy.dir}/${lib.name}-stage.jar">
<fileset dir="${classes.dir}" includes="com/threerings/stage/**"/>
<fileset dir="${classes.dir}" includes="rsrc/**/stage/**"/>
</jar>
<jar destfile="${deploy.dir}/${app.name}-stats.jar">
<jar destfile="${deploy.dir}/${lib.name}-stats.jar">
<fileset dir="${classes.dir}" includes="com/threerings/stats/**"/>
<fileset dir="${classes.dir}" includes="rsrc/**/stats/**"/>
</jar>
<jar destfile="${deploy.dir}/${app.name}-whirled.jar">
<jar destfile="${deploy.dir}/${lib.name}-whirled.jar">
<fileset dir="${classes.dir}" includes="com/threerings/whirled/**"/>
<fileset dir="${classes.dir}" includes="rsrc/**/whirled/**"/>
</jar>
@@ -258,8 +288,8 @@
<!-- various bits used by the retroweaver tasks -->
<taskdef name="weave" classpathref="classpath"
classname="com.rc.retroweaver.ant.RetroWeaverTask"/>
<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}"/>
<path id="retrocp">
<pathelement location="/usr/local/jdk1.4/jre/lib/rt.jar"/>
<fileset dir="lib" includes="**/*.jar"/>
@@ -344,23 +374,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>
+81
View File
@@ -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>
+4
View File
@@ -2,6 +2,7 @@
<!-- declares the libraries needed to build vilya -->
<project name="library-dependencies">
<fileset dir="${libs.dir}" id="vilya.libs">
<!-- Java dependencies -->
<include name="commons-collections.jar"/>
<include name="commons-digester.jar"/>
<include name="commons-io.jar"/>
@@ -21,5 +22,8 @@
<include name="samskivert.jar"/>
<include name="velocity-1.5-dev.jar"/>
<include name="xml-writer.jar"/>
<!-- ActionScript dependencies -->
<include name="narya.swc"/>
<include name="nenya.swc"/>
</fileset>
</project>
+1 -1
View File
@@ -10,7 +10,7 @@
<property name="deploy.dir" value="dist"/>
<!-- import some targets to check dependency availability -->
<import file="../depends-incl.xml"/>
<import file="../etc/depends-incl.xml"/>
<!-- declare our classpath -->
<property name="classes.dir" value="${deploy.dir}/classes"/>