Stop switching different source files into Environment.as's place. Instead build tiny swc's with the player-specific Environment.as and the thane-specific one. Then compile naryalib.swc with one of these tiny swc's as an external library. When we compile the final executables we'll do a inclusive linking to get the right implementation into place.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5182 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -141,7 +141,6 @@
|
|||||||
<target name="clean" depends="common-clean">
|
<target name="clean" depends="common-clean">
|
||||||
<delete dir="${deploy.dir}/classes"/>
|
<delete dir="${deploy.dir}/classes"/>
|
||||||
<delete dir="${deploy.dir}/docs"/>
|
<delete dir="${deploy.dir}/docs"/>
|
||||||
<delete failonerror="false" file="src/as/com/threerings/util/env/Environment.as"/>
|
|
||||||
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.jar"/></delete>
|
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.jar"/></delete>
|
||||||
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.swc"/></delete>
|
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.swc"/></delete>
|
||||||
</target>
|
</target>
|
||||||
@@ -149,7 +148,6 @@
|
|||||||
<!-- wipes the entire build directory clean -->
|
<!-- wipes the entire build directory clean -->
|
||||||
<target name="distclean" depends="common-clean">
|
<target name="distclean" depends="common-clean">
|
||||||
<delete dir="${deploy.dir}"/>
|
<delete dir="${deploy.dir}"/>
|
||||||
<delete failonerror="false" file="src/as/com/threerings/util/env/Environment.as"/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- common clean tasks -->
|
<!-- common clean tasks -->
|
||||||
@@ -174,7 +172,12 @@
|
|||||||
<and>
|
<and>
|
||||||
<uptodate targetfile="${deploy.dir}/${lib.name}lib.swc">
|
<uptodate targetfile="${deploy.dir}/${lib.name}lib.swc">
|
||||||
<srcfiles dir="src/as" includes="**/*.as"/>
|
<srcfiles dir="src/as" includes="**/*.as"/>
|
||||||
<srcfiles dir="src/as" includes="**/Environment.as-fp"/>
|
</uptodate>
|
||||||
|
<uptodate targetfile="${deploy.dir}/playerEnv.swc">
|
||||||
|
<srcfiles dir="src/player" includes="**/*.as"/>
|
||||||
|
</uptodate>
|
||||||
|
<uptodate targetfile="${deploy.dir}/thaneEnv.swc">
|
||||||
|
<srcfiles dir="src/thane" includes="**/*.as"/>
|
||||||
</uptodate>
|
</uptodate>
|
||||||
</and>
|
</and>
|
||||||
</or></condition>
|
</or></condition>
|
||||||
@@ -182,60 +185,51 @@
|
|||||||
|
|
||||||
<!-- builds our Flash library -->
|
<!-- builds our Flash library -->
|
||||||
<target name="aslib" unless="no_build_aslib" depends="checkaslib">
|
<target name="aslib" unless="no_build_aslib" depends="checkaslib">
|
||||||
|
<!-- Generate aslib-config.xml for Flash Player and general compilation -->
|
||||||
<copy file="etc/aslib-config.xml.in" tofile="${deploy.dir}/aslib-config.xml">
|
<copy file="etc/aslib-config.xml.in" tofile="${deploy.dir}/aslib-config.xml">
|
||||||
<filterset>
|
<filterset>
|
||||||
<filter token="flex_sdk_dir" value="${flexsdk.dir}"/>
|
<filter token="flex_sdk_dir" value="${flexsdk.dir}"/>
|
||||||
<filter token="lib_name" value="${lib.name}"/>
|
<filter token="lib_name" value="${lib.name}"/>
|
||||||
</filterset>
|
</filterset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy overwrite="true" file="src/as/com/threerings/util/env/Environment.as-fp"
|
<!-- Generate thane-config.xml for targetting Thane -->
|
||||||
tofile="src/as/com/threerings/util/env/Environment.as"/>
|
<copy file="etc/thane-config.xml.in" tofile="${deploy.dir}/thane-config.xml">
|
||||||
|
<filterset>
|
||||||
|
<filter token="flex_sdk_dir" value="${flexsdk.dir}"/>
|
||||||
|
</filterset>
|
||||||
|
</copy>
|
||||||
|
<!-- Build Environment.as for the Flash Player -->
|
||||||
|
<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/player/"/>
|
||||||
|
<arg value="-include-sources=src/player/"/>
|
||||||
|
<arg value="-output"/>
|
||||||
|
<arg value="${deploy.dir}/playerEnv.swc"/>
|
||||||
|
</java>
|
||||||
|
<!-- Build Environment.as for Thane -->
|
||||||
|
<java jar="${flexsdk.dir}/lib/compc.jar" fork="true" failonerror="true">
|
||||||
|
<arg value="-load-config"/>
|
||||||
|
<arg value="${deploy.dir}/thane-config.xml"/>
|
||||||
|
<arg value="-compiler.optimize"/>
|
||||||
|
<arg value="-compiler.source-path=src/thane/"/>
|
||||||
|
<arg value="-include-sources=src/thane/"/>
|
||||||
|
<arg value="-output"/>
|
||||||
|
<arg value="${deploy.dir}/thaneEnv.swc"/>
|
||||||
|
</java>
|
||||||
|
<!-- Build Narya -->
|
||||||
<java jar="${flexsdk.dir}/lib/compc.jar" fork="true" failonerror="true">
|
<java jar="${flexsdk.dir}/lib/compc.jar" fork="true" failonerror="true">
|
||||||
<arg value="-load-config"/>
|
<arg value="-load-config"/>
|
||||||
<arg value="${deploy.dir}/aslib-config.xml"/>
|
<arg value="${deploy.dir}/aslib-config.xml"/>
|
||||||
<arg value="-compiler.optimize"/>
|
<arg value="-compiler.optimize"/>
|
||||||
<arg value="-compiler.source-path=src/as/"/>
|
<arg value="-compiler.source-path=src/as/"/>
|
||||||
|
<arg value="-compiler.external-library-path+=${deploy.dir}/playerEnv.swc"/>
|
||||||
<arg value="-include-sources=src/as/"/>
|
<arg value="-include-sources=src/as/"/>
|
||||||
<arg value="-output"/>
|
<arg value="-output"/>
|
||||||
<arg value="${deploy.dir}/${lib.name}lib.swc"/>
|
<arg value="${deploy.dir}/${lib.name}lib.swc"/>
|
||||||
</java>
|
</java>
|
||||||
<delete file="${deploy.dir}/aslib-config.xml"/>
|
<delete file="${deploy.dir}/aslib-config.xml"/>
|
||||||
<delete file="src/as/com/threerings/util/env/Environment.as"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- checks whether our thane library needs building -->
|
|
||||||
<target name="checkabclib">
|
|
||||||
<condition property="no_build_abclib"><or>
|
|
||||||
<not><available classname="macromedia.asc.embedding.ScriptCompiler"
|
|
||||||
classpathref="classpath"/></not>
|
|
||||||
<uptodate targetfile="${deploy.dir}/${lib.name}-abc.abc">
|
|
||||||
<srcfiles dir="src/as" includes="**/*.as"/>
|
|
||||||
<srcfiles dir="src/as/com/threerings/util/env" includes="Environment.as-tm"/>
|
|
||||||
<srcfiles dir="etc" includes="asc-files-*.txt"/>
|
|
||||||
<srcfiles dir="${deploy.dir}/lib" includes="*.abc"/>
|
|
||||||
</uptodate>
|
|
||||||
</or></condition>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- builds our thane library -->
|
|
||||||
<target name="abclib" unless="no_build_abclib" depends="checkabclib">
|
|
||||||
<taskdef name="asc" classname="flex.ant.AscTask" classpathref="classpath"/>
|
|
||||||
<copy overwrite="true" file="src/as/com/threerings/util/env/Environment.as-tm"
|
|
||||||
tofile="src/as/com/threerings/util/env/Environment.as"/>
|
|
||||||
<asc as3="true" strict="true" classpathref="classpath" use="AS3">
|
|
||||||
<import dir="${deploy.dir}/lib">
|
|
||||||
<include name="tamarin-builtin*.abc"/>
|
|
||||||
<include name="thane*.abc"/>
|
|
||||||
</import>
|
|
||||||
<in dir="src/as" includes="com/threerings/util/env/Environment.as"/>
|
|
||||||
<in dir="src/as"><includesfile name="etc/asc-files-00.txt"/></in>
|
|
||||||
<in dir="src/as"><includesfile name="etc/asc-files-01.txt"/></in>
|
|
||||||
<in dir="src/as"><includesfile name="etc/asc-files-02.txt"/></in>
|
|
||||||
<in dir="src/as"><includesfile name="etc/asc-files-03.txt"/></in>
|
|
||||||
<filespec dir="etc" includes="empty.as"/>
|
|
||||||
</asc>
|
|
||||||
<delete file="src/as/com/threerings/util/env/Environment.as"/>
|
|
||||||
<move overwrite="true" file="etc/empty.abc" tofile="${deploy.dir}/${lib.name}-abc.abc"/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- build the native libraries -->
|
<!-- build the native libraries -->
|
||||||
@@ -279,7 +273,7 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- a target for rebuilding everything -->
|
<!-- a target for rebuilding everything -->
|
||||||
<target name="all" depends="clean,prepare,compile,aslib,abclib,ninstall,javadoc,tests,dist"/>
|
<target name="all" depends="clean,prepare,compile,aslib,ninstall,javadoc,tests,dist"/>
|
||||||
|
|
||||||
<!-- builds our distribution files (war and jar) -->
|
<!-- builds our distribution files (war and jar) -->
|
||||||
<target name="dist" depends="prepare,compile,procstream,aslib,ninstall,tests">
|
<target name="dist" depends="prepare,compile,procstream,aslib,ninstall,tests">
|
||||||
|
|||||||
+1
-2
@@ -16,7 +16,6 @@
|
|||||||
<include name="retroweaver-all-1.2.2.jar"/>
|
<include name="retroweaver-all-1.2.2.jar"/>
|
||||||
<include name="samskivert.jar"/>
|
<include name="samskivert.jar"/>
|
||||||
<include name="velocity-1.5-dev.jar"/>
|
<include name="velocity-1.5-dev.jar"/>
|
||||||
<include name="tamarin-builtin*.abc"/>
|
<include name="thane*.swc"/>
|
||||||
<include name="thane*.abc"/>
|
|
||||||
</fileset>
|
</fileset>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -0,0 +1,367 @@
|
|||||||
|
<flex-config>
|
||||||
|
<!-- benchmark: output performance benchmark-->
|
||||||
|
<!-- benchmark usage:
|
||||||
|
<benchmark>boolean</benchmark>
|
||||||
|
-->
|
||||||
|
<compiler>
|
||||||
|
<!-- compiler.accessible: generate an accessible SWF-->
|
||||||
|
<accessible>false</accessible>
|
||||||
|
<!-- compiler.actionscript-file-encoding: specifies actionscript file encoding. If there is no BOM in the AS3 source files, the compiler will use this file encoding.-->
|
||||||
|
<!-- compiler.actionscript-file-encoding usage:
|
||||||
|
<actionscript-file-encoding>string</actionscript-file-encoding>
|
||||||
|
-->
|
||||||
|
<!-- compiler.allow-source-path-overlap: checks if a source-path entry is a subdirectory of another source-path entry. It helps make the package names of MXML components unambiguous.-->
|
||||||
|
<allow-source-path-overlap>false</allow-source-path-overlap>
|
||||||
|
<!-- compiler.as3: use the ActionScript 3 class based object model for greater performance and better error reporting. In the class based object model most built-in functions are implemented as fixed methods of classes.-->
|
||||||
|
<as3>true</as3>
|
||||||
|
<!-- compiler.context-root: path to replace {context.root} tokens for service channel endpoints-->
|
||||||
|
<!-- compiler.context-root usage:
|
||||||
|
<context-root>context-path</context-root>
|
||||||
|
-->
|
||||||
|
<!-- compiler.debug: generates a movie that is suitable for debugging-->
|
||||||
|
<debug>false</debug>
|
||||||
|
<!-- compiler.defaults-css-files usage:
|
||||||
|
<defaults-css-files>
|
||||||
|
<filename>string</filename>
|
||||||
|
<filename>string</filename>
|
||||||
|
</defaults-css-files>
|
||||||
|
-->
|
||||||
|
<!-- compiler.defaults-css-url: defines the location of the default style sheet. Setting this option overrides the implicit use of the defaults.css style sheet in the framework.swc file.-->
|
||||||
|
<!-- compiler.defaults-css-url usage:
|
||||||
|
<defaults-css-url>string</defaults-css-url>
|
||||||
|
-->
|
||||||
|
<!-- compiler.define: define a global AS3 conditional compilation definition, e.g. -define=CONFIG::debugging,true or -define+=CONFIG::debugging,true (to append to existing definitions in flex-config.xml) -->
|
||||||
|
<!-- compiler.define usage:
|
||||||
|
<define>
|
||||||
|
<name>string</name>
|
||||||
|
<value>string</value>
|
||||||
|
<value>string</value>
|
||||||
|
</define>
|
||||||
|
-->
|
||||||
|
<!-- compiler.es: use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype properties. In the prototype based object model built-in functions are implemented as dynamic properties of prototype objects.-->
|
||||||
|
<es>false</es>
|
||||||
|
<!-- compiler.external-library-path: list of SWC files or directories to compile against but to omit from linking-->
|
||||||
|
<external-library-path>
|
||||||
|
<path-element>lib/thane-0.0-SNAPSHOT.swc</path-element>
|
||||||
|
</external-library-path>
|
||||||
|
<fonts>
|
||||||
|
<!-- compiler.fonts.advanced-anti-aliasing: enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small fonts.-->
|
||||||
|
<advanced-anti-aliasing>true</advanced-anti-aliasing>
|
||||||
|
<!-- compiler.fonts.flash-type: enables FlashType for embedded fonts, which provides greater clarity for small fonts.-->
|
||||||
|
<!-- compiler.fonts.flash-type usage:
|
||||||
|
<flash-type>boolean</flash-type>
|
||||||
|
-->
|
||||||
|
<languages>
|
||||||
|
<!-- compiler.fonts.languages.language-range: a range to restrict the number of font glyphs embedded into the SWF-->
|
||||||
|
<!-- compiler.fonts.languages.language-range usage:
|
||||||
|
<language-range>
|
||||||
|
<lang>string</lang>
|
||||||
|
<range>string</range>
|
||||||
|
<range>string</range>
|
||||||
|
</language-range>
|
||||||
|
-->
|
||||||
|
</languages>
|
||||||
|
<!-- compiler.fonts.local-fonts-snapshot: File containing system font data produced by flex2.tools.FontSnapshot.-->
|
||||||
|
<local-fonts-snapshot>@flex_sdk_dir@/frameworks/localFonts.ser</local-fonts-snapshot>
|
||||||
|
<!-- compiler.fonts.managers: Compiler font manager classes, in policy resolution order-->
|
||||||
|
<managers>
|
||||||
|
<manager-class>flash.fonts.JREFontManager</manager-class>
|
||||||
|
<manager-class>flash.fonts.AFEFontManager</manager-class>
|
||||||
|
<manager-class>flash.fonts.BatikFontManager</manager-class>
|
||||||
|
</managers>
|
||||||
|
<!-- compiler.fonts.max-cached-fonts: sets the maximum number of fonts to keep in the server cache. The default value is 20.-->
|
||||||
|
<max-cached-fonts>20</max-cached-fonts>
|
||||||
|
<!-- compiler.fonts.max-glyphs-per-face: sets the maximum number of character glyph-outlines to keep in the server cache for each font face. The default value is 1000.-->
|
||||||
|
<max-glyphs-per-face>1000</max-glyphs-per-face>
|
||||||
|
</fonts>
|
||||||
|
<!-- compiler.headless-server: a flag to set when Flex is running on a server without a display-->
|
||||||
|
<!-- compiler.headless-server usage:
|
||||||
|
<headless-server>boolean</headless-server>
|
||||||
|
-->
|
||||||
|
<!-- compiler.include-libraries: a list of libraries (SWCs) to completely include in the SWF-->
|
||||||
|
<!-- compiler.include-libraries usage:
|
||||||
|
<include-libraries>
|
||||||
|
<library>string</library>
|
||||||
|
<library>string</library>
|
||||||
|
</include-libraries>
|
||||||
|
-->
|
||||||
|
<!-- compiler.incremental: enables incremental compilation-->
|
||||||
|
<!-- compiler.incremental usage:
|
||||||
|
<incremental>boolean</incremental>
|
||||||
|
-->
|
||||||
|
<!-- compiler.keep-all-type-selectors: disables the pruning of unused CSS type selectors-->
|
||||||
|
<!-- compiler.keep-all-type-selectors usage:
|
||||||
|
<keep-all-type-selectors>boolean</keep-all-type-selectors>
|
||||||
|
-->
|
||||||
|
<!-- compiler.keep-as3-metadata: keep the specified metadata in the SWF-->
|
||||||
|
<!-- compiler.keep-as3-metadata usage:
|
||||||
|
<keep-as3-metadata>
|
||||||
|
<name>string</name>
|
||||||
|
<name>string</name>
|
||||||
|
</keep-as3-metadata>
|
||||||
|
-->
|
||||||
|
<!-- compiler.keep-generated-actionscript: save temporary source files generated during MXML compilation-->
|
||||||
|
<keep-generated-actionscript>false</keep-generated-actionscript>
|
||||||
|
<!-- compiler.library-path: list of SWC files or directories that contain SWC files-->
|
||||||
|
<library-path>
|
||||||
|
</library-path>
|
||||||
|
<!-- compiler.locale: specifies the locale for internationalization-->
|
||||||
|
<locale>
|
||||||
|
<locale-element>en_US</locale-element>
|
||||||
|
</locale>
|
||||||
|
<mxml>
|
||||||
|
<!-- compiler.mxml.compatibility-version: specifies a compatibility version. e.g. -compatibility-version=2.0.1-->
|
||||||
|
<!-- compiler.mxml.compatibility-version usage:
|
||||||
|
<compatibility-version>version</compatibility-version>
|
||||||
|
-->
|
||||||
|
</mxml>
|
||||||
|
<namespaces>
|
||||||
|
<!-- compiler.namespaces.namespace: Specify a URI to associate with a manifest of components for use as MXML elements-->
|
||||||
|
<namespace>
|
||||||
|
<uri>http://www.adobe.com/2006/mxml</uri>
|
||||||
|
<manifest>@flex_sdk_dir@/frameworks/mxml-manifest.xml</manifest>
|
||||||
|
</namespace>
|
||||||
|
</namespaces>
|
||||||
|
<!-- compiler.optimize: Enable post-link SWF optimization-->
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<!-- compiler.services: path to Flex Data Services configuration file-->
|
||||||
|
<!-- compiler.services usage:
|
||||||
|
<services>filename</services>
|
||||||
|
-->
|
||||||
|
<!-- compiler.show-actionscript-warnings: runs the AS3 compiler in a mode that detects legal but potentially incorrect code-->
|
||||||
|
<show-actionscript-warnings>true</show-actionscript-warnings>
|
||||||
|
<!-- compiler.show-binding-warnings: toggle whether warnings generated from data binding code are displayed-->
|
||||||
|
<show-binding-warnings>true</show-binding-warnings>
|
||||||
|
<!-- compiler.show-shadowed-device-font-warnings: toggles whether warnings are displayed when an embedded font name shadows a device font name-->
|
||||||
|
<show-shadowed-device-font-warnings>true</show-shadowed-device-font-warnings>
|
||||||
|
<!-- compiler.show-unused-type-selector-warnings: toggle whether warnings generated from unused CSS type selectors are displayed-->
|
||||||
|
<show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
|
||||||
|
<!-- compiler.source-path: list of path elements that form the roots of ActionScript class hierarchies-->
|
||||||
|
<!-- compiler.source-path usage:
|
||||||
|
<source-path>
|
||||||
|
<path-element>string</path-element>
|
||||||
|
<path-element>string</path-element>
|
||||||
|
</source-path>
|
||||||
|
-->
|
||||||
|
<!-- compiler.strict: runs the AS3 compiler in strict error checking mode.-->
|
||||||
|
<strict>true</strict>
|
||||||
|
<!-- compiler.theme: list of CSS or SWC files to apply as a theme-->
|
||||||
|
<!-- compiler.theme usage:
|
||||||
|
<theme>
|
||||||
|
<filename>string</filename>
|
||||||
|
<filename>string</filename>
|
||||||
|
</theme>
|
||||||
|
-->
|
||||||
|
<!-- compiler.use-resource-bundle-metadata: determines whether resources bundles are included in the application.-->
|
||||||
|
<use-resource-bundle-metadata>true</use-resource-bundle-metadata>
|
||||||
|
<!-- compiler.verbose-stacktraces: save callstack information to the SWF for debugging-->
|
||||||
|
<verbose-stacktraces>true</verbose-stacktraces>
|
||||||
|
<!-- compiler.warn-array-tostring-changes: Array.toString() format has changed.-->
|
||||||
|
<warn-array-tostring-changes>false</warn-array-tostring-changes>
|
||||||
|
<!-- compiler.warn-assignment-within-conditional: Assignment within conditional.-->
|
||||||
|
<warn-assignment-within-conditional>true</warn-assignment-within-conditional>
|
||||||
|
<!-- compiler.warn-bad-array-cast: Possibly invalid Array cast operation.-->
|
||||||
|
<warn-bad-array-cast>true</warn-bad-array-cast>
|
||||||
|
<!-- compiler.warn-bad-bool-assignment: Non-Boolean value used where a Boolean value was expected.-->
|
||||||
|
<warn-bad-bool-assignment>true</warn-bad-bool-assignment>
|
||||||
|
<!-- compiler.warn-bad-date-cast: Invalid Date cast operation.-->
|
||||||
|
<warn-bad-date-cast>true</warn-bad-date-cast>
|
||||||
|
<!-- compiler.warn-bad-es3-type-method: Unknown method.-->
|
||||||
|
<warn-bad-es3-type-method>true</warn-bad-es3-type-method>
|
||||||
|
<!-- compiler.warn-bad-es3-type-prop: Unknown property.-->
|
||||||
|
<warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
|
||||||
|
<!-- compiler.warn-bad-nan-comparison: Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN.-->
|
||||||
|
<warn-bad-nan-comparison>true</warn-bad-nan-comparison>
|
||||||
|
<!-- compiler.warn-bad-null-assignment: Impossible assignment to null.-->
|
||||||
|
<warn-bad-null-assignment>true</warn-bad-null-assignment>
|
||||||
|
<!-- compiler.warn-bad-null-comparison: Illogical comparison with null.-->
|
||||||
|
<warn-bad-null-comparison>true</warn-bad-null-comparison>
|
||||||
|
<!-- compiler.warn-bad-undefined-comparison: Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined.-->
|
||||||
|
<warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
|
||||||
|
<!-- compiler.warn-boolean-constructor-with-no-args: Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0.-->
|
||||||
|
<warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
|
||||||
|
<!-- compiler.warn-changes-in-resolve: __resolve is no longer supported.-->
|
||||||
|
<warn-changes-in-resolve>false</warn-changes-in-resolve>
|
||||||
|
<!-- compiler.warn-class-is-sealed: Class is sealed. It cannot have members added to it dynamically.-->
|
||||||
|
<warn-class-is-sealed>true</warn-class-is-sealed>
|
||||||
|
<!-- compiler.warn-const-not-initialized: Constant not initialized.-->
|
||||||
|
<warn-const-not-initialized>true</warn-const-not-initialized>
|
||||||
|
<!-- compiler.warn-constructor-returns-value: Function used in new expression returns a value. Result will be what the function returns, rather than a new instance of that function.-->
|
||||||
|
<warn-constructor-returns-value>false</warn-constructor-returns-value>
|
||||||
|
<!-- compiler.warn-deprecated-event-handler-error: EventHandler was not added as a listener.-->
|
||||||
|
<warn-deprecated-event-handler-error>true</warn-deprecated-event-handler-error>
|
||||||
|
<!-- compiler.warn-deprecated-function-error: Unsupported ActionScript 2.0 function.-->
|
||||||
|
<warn-deprecated-function-error>true</warn-deprecated-function-error>
|
||||||
|
<!-- compiler.warn-deprecated-property-error: Unsupported ActionScript 2.0 property.-->
|
||||||
|
<warn-deprecated-property-error>true</warn-deprecated-property-error>
|
||||||
|
<!-- compiler.warn-duplicate-argument-names: More than one argument by the same name.-->
|
||||||
|
<warn-duplicate-argument-names>true</warn-duplicate-argument-names>
|
||||||
|
<!-- compiler.warn-duplicate-variable-def: Duplicate variable definition -->
|
||||||
|
<warn-duplicate-variable-def>true</warn-duplicate-variable-def>
|
||||||
|
<!-- compiler.warn-for-var-in-changes: ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order.-->
|
||||||
|
<warn-for-var-in-changes>false</warn-for-var-in-changes>
|
||||||
|
<!-- compiler.warn-import-hides-class: Importing a package by the same name as the current class will hide that class identifier in this scope.-->
|
||||||
|
<warn-import-hides-class>true</warn-import-hides-class>
|
||||||
|
<!-- compiler.warn-instance-of-changes: Use of the instanceof operator.-->
|
||||||
|
<warn-instance-of-changes>true</warn-instance-of-changes>
|
||||||
|
<!-- compiler.warn-internal-error: Internal error in compiler.-->
|
||||||
|
<warn-internal-error>true</warn-internal-error>
|
||||||
|
<!-- compiler.warn-level-not-supported: _level is no longer supported. For more information, see the flash.display package.-->
|
||||||
|
<warn-level-not-supported>true</warn-level-not-supported>
|
||||||
|
<!-- compiler.warn-missing-namespace-decl: Missing namespace declaration (e.g. variable is not defined to be public, private, etc.).-->
|
||||||
|
<warn-missing-namespace-decl>true</warn-missing-namespace-decl>
|
||||||
|
<!-- compiler.warn-negative-uint-literal: Negative value will become a large positive value when assigned to a uint data type.-->
|
||||||
|
<warn-negative-uint-literal>true</warn-negative-uint-literal>
|
||||||
|
<!-- compiler.warn-no-constructor: Missing constructor.-->
|
||||||
|
<warn-no-constructor>false</warn-no-constructor>
|
||||||
|
<!-- compiler.warn-no-explicit-super-call-in-constructor: The super() statement was not called within the constructor.-->
|
||||||
|
<warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
|
||||||
|
<!-- compiler.warn-no-type-decl: Missing type declaration.-->
|
||||||
|
<warn-no-type-decl>true</warn-no-type-decl>
|
||||||
|
<!-- compiler.warn-number-from-string-changes: In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns NaN in ActionScript 2.0 when the parameter is '' or contains white space.-->
|
||||||
|
<warn-number-from-string-changes>false</warn-number-from-string-changes>
|
||||||
|
<!-- compiler.warn-scoping-change-in-this: Change in scoping for the this keyword. Class methods extracted from an instance of a class will always resolve this back to that instance. In ActionScript 2.0 this is looked up dynamically based on where the method is invoked from.-->
|
||||||
|
<warn-scoping-change-in-this>false</warn-scoping-change-in-this>
|
||||||
|
<!-- compiler.warn-slow-text-field-addition: Inefficient use of += on a TextField.-->
|
||||||
|
<warn-slow-text-field-addition>true</warn-slow-text-field-addition>
|
||||||
|
<!-- compiler.warn-unlikely-function-value: Possible missing parentheses.-->
|
||||||
|
<warn-unlikely-function-value>true</warn-unlikely-function-value>
|
||||||
|
<!-- compiler.warn-xml-class-has-changed: Possible usage of the ActionScript 2.0 XML class.-->
|
||||||
|
<warn-xml-class-has-changed>false</warn-xml-class-has-changed>
|
||||||
|
</compiler>
|
||||||
|
<!-- debug-password: the password to include in debuggable SWFs-->
|
||||||
|
<debug-password></debug-password>
|
||||||
|
<!-- default-background-color: default background color (may be overridden by the application code)-->
|
||||||
|
<default-background-color>0x869CA7</default-background-color>
|
||||||
|
<!-- default-frame-rate: default frame rate to be used in the SWF.-->
|
||||||
|
<default-frame-rate>30</default-frame-rate>
|
||||||
|
<!-- default-script-limits: default script execution limits (may be overridden by root attributes)-->
|
||||||
|
<default-script-limits>
|
||||||
|
<max-recursion-depth>1000</max-recursion-depth>
|
||||||
|
<max-execution-time>15</max-execution-time>
|
||||||
|
</default-script-limits>
|
||||||
|
<!-- default-size: default application size (may be overridden by root attributes in the application)-->
|
||||||
|
<default-size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
</default-size>
|
||||||
|
<!-- externs: a list of symbols to omit from linking when building a SWF-->
|
||||||
|
<!-- externs usage:
|
||||||
|
<externs>
|
||||||
|
<symbol>string</symbol>
|
||||||
|
<symbol>string</symbol>
|
||||||
|
</externs>
|
||||||
|
-->
|
||||||
|
<frames>
|
||||||
|
<!-- frames.frame: A SWF frame label with a sequence of classnames that will be linked onto the frame.-->
|
||||||
|
<!-- frames.frame usage:
|
||||||
|
<frame>
|
||||||
|
<label>string</label>
|
||||||
|
<classname>string</classname>
|
||||||
|
</frame>
|
||||||
|
-->
|
||||||
|
</frames>
|
||||||
|
<!-- include-resource-bundles: a list of resource bundles to include in the output SWC-->
|
||||||
|
<!-- include-resource-bundles usage:
|
||||||
|
<include-resource-bundles>
|
||||||
|
<bundle>string</bundle>
|
||||||
|
<bundle>string</bundle>
|
||||||
|
</include-resource-bundles>
|
||||||
|
-->
|
||||||
|
<!-- includes: a list of symbols to always link in when building a SWF-->
|
||||||
|
<!-- includes usage:
|
||||||
|
<includes>
|
||||||
|
<symbol>string</symbol>
|
||||||
|
<symbol>string</symbol>
|
||||||
|
</includes>
|
||||||
|
-->
|
||||||
|
<!-- link-report: Output a XML-formatted report of all definitions linked into the application.-->
|
||||||
|
<!-- link-report usage:
|
||||||
|
<link-report>filename</link-report>
|
||||||
|
-->
|
||||||
|
<!-- load-config: load a file containing configuration options-->
|
||||||
|
<!--
|
||||||
|
<load-config>${flexlib}/${configname}-config.xml</load-config>
|
||||||
|
-->
|
||||||
|
<!-- load-externs: an XML file containing <def>, <pre>, and <ext> symbols to omit from linking when building a SWF-->
|
||||||
|
<!-- load-externs usage:
|
||||||
|
<load-externs>filename</load-externs>
|
||||||
|
-->
|
||||||
|
<metadata>
|
||||||
|
<!-- metadata.contributor: A contributor's name to store in the SWF metadata-->
|
||||||
|
<!-- metadata.contributor usage:
|
||||||
|
<contributor>name</contributor>
|
||||||
|
-->
|
||||||
|
<!-- metadata.creator: A creator's name to store in the SWF metadata-->
|
||||||
|
<creator>Three Rings Design, Inc.</creator>
|
||||||
|
<!-- metadata.date: The creation date to store in the SWF metadata-->
|
||||||
|
<!-- metadata.date usage:
|
||||||
|
<date>text</date>
|
||||||
|
-->
|
||||||
|
<!-- metadata.description: The default description to store in the SWF metadata-->
|
||||||
|
<description>http://www.whirled.com</description>
|
||||||
|
<!-- metadata.language: The language to store in the SWF metadata (i.e. EN, FR)-->
|
||||||
|
<language>EN</language>
|
||||||
|
<!-- metadata.localized-description: A localized RDF/XMP description to store in the SWF metadata-->
|
||||||
|
<!-- metadata.localized-description usage:
|
||||||
|
<localized-description>
|
||||||
|
<text>string</text>
|
||||||
|
<lang>string</lang>
|
||||||
|
<lang>string</lang>
|
||||||
|
</localized-description>
|
||||||
|
-->
|
||||||
|
<!-- metadata.localized-title: A localized RDF/XMP title to store in the SWF metadata-->
|
||||||
|
<!-- metadata.localized-title usage:
|
||||||
|
<localized-title>
|
||||||
|
<title>string</title>
|
||||||
|
<lang>string</lang>
|
||||||
|
<lang>string</lang>
|
||||||
|
</localized-title>
|
||||||
|
-->
|
||||||
|
<!-- metadata.publisher: A publisher's name to store in the SWF metadata-->
|
||||||
|
<publisher>Three Rings Design, Inc.</publisher>
|
||||||
|
<!-- metadata.title: The default title to store in the SWF metadata-->
|
||||||
|
<title>Whirled</title>
|
||||||
|
</metadata>
|
||||||
|
<!-- output: the filename of the SWF movie to create-->
|
||||||
|
<!-- output usage:
|
||||||
|
<output>filename</output>
|
||||||
|
-->
|
||||||
|
<!-- raw-metadata: XML text to store in the SWF metadata (overrides metadata.* configuration)-->
|
||||||
|
<!-- raw-metadata usage:
|
||||||
|
<raw-metadata>text</raw-metadata>
|
||||||
|
-->
|
||||||
|
<!-- resource-bundle-list: prints a list of resource bundles to a file for input to the compc compiler to create a resource bundle SWC file. -->
|
||||||
|
<!-- resource-bundle-list usage:
|
||||||
|
<resource-bundle-list>filename</resource-bundle-list>
|
||||||
|
-->
|
||||||
|
<!-- runtime-shared-libraries: a list of runtime shared library URLs to be loaded before the application starts-->
|
||||||
|
<!-- runtime-shared-libraries usage:
|
||||||
|
<runtime-shared-libraries>
|
||||||
|
<url>string</url>
|
||||||
|
<url>string</url>
|
||||||
|
</runtime-shared-libraries>
|
||||||
|
-->
|
||||||
|
<runtime-shared-library-path>
|
||||||
|
</runtime-shared-library-path>
|
||||||
|
<!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
|
||||||
|
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
|
||||||
|
<!-- target-player: specifies the version of the player the application is targeting. Features requiring a later version will not be compiled into the application. The minimum value supported is "9.0.0".-->
|
||||||
|
<!-- target-player usage:
|
||||||
|
<target-player>version</target-player>
|
||||||
|
-->
|
||||||
|
<!-- use-network: toggle whether the SWF is flagged for access to network resources-->
|
||||||
|
<use-network>true</use-network>
|
||||||
|
<!-- verify-digests: verifies the libraries loaded at runtime are the correct ones.-->
|
||||||
|
<!-- verify-digests usage:
|
||||||
|
<verify-digests>boolean</verify-digests>
|
||||||
|
-->
|
||||||
|
<!-- version: display the build version of the program-->
|
||||||
|
<!-- version usage:
|
||||||
|
<version>boolean</version>
|
||||||
|
-->
|
||||||
|
<!-- warnings: toggle the display of warnings-->
|
||||||
|
<!-- warnings usage:
|
||||||
|
<warnings>boolean</warnings>
|
||||||
|
-->
|
||||||
|
</flex-config>
|
||||||
src/as/com/threerings/util/env/Environment.as-fp → src/player/com/threerings/util/env/Environment.as
Vendored
+13
-4
@@ -22,8 +22,7 @@
|
|||||||
package com.threerings.util.env {
|
package com.threerings.util.env {
|
||||||
|
|
||||||
import flash.utils.describeType;
|
import flash.utils.describeType;
|
||||||
|
import flash.utils.getDefinitionByName;
|
||||||
import com.threerings.util.ClassUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flash Player specific implementation of Environment.
|
* Flash Player specific implementation of Environment.
|
||||||
@@ -69,7 +68,7 @@ public class Environment
|
|||||||
var exts :XMLList = typeInfo.child("extendsClass").attribute("type");
|
var exts :XMLList = typeInfo.child("extendsClass").attribute("type");
|
||||||
var type :String;
|
var type :String;
|
||||||
for each (type in exts) {
|
for each (type in exts) {
|
||||||
if (asClass == ClassUtil.getClassByName(type)) {
|
if (asClass == getClassByName(type)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,12 +77,22 @@ public class Environment
|
|||||||
var imps :XMLList = typeInfo.child("implementsInterface")
|
var imps :XMLList = typeInfo.child("implementsInterface")
|
||||||
.attribute("type");
|
.attribute("type");
|
||||||
for each (type in imps) {
|
for each (type in imps) {
|
||||||
if (asClass == ClassUtil.getClassByName(type)) {
|
if (asClass == getClassByName(type)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function getClassByName (cname :String) :Class
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return (getDefinitionByName(cname.replace("::", ".")) as Class);
|
||||||
|
|
||||||
|
} catch (error :ReferenceError) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user