Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here’s my config in asconfig.json:
- {
- "config": "flex",
- "compilerOptions": {
- "debug": true,
- "js-output-type": "flexjs",
- "source-map": true,
- "external-library-path": [
- "typedefs"
- ]
- },
- "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
- "files":
- [
- "src/PrintUIManagement.mxml"
- ]
- }
- tasks.json:
- {
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- "version": "0.1.0",
- "command": "asconfigc",
- "isShellCommand": true,
- "args": [
- "--flexHome=/Users/harbs/Documents/Apache Flex Dist/FlexJSNightly"
- ],
- "showOutput": "always"
- }
- launch.json:
- {
- "version": "0.2.0",
- "configurations": [
- {
- "name": "NextGenAS Node.js Launch",
- "type": "node",
- "request": "launch",
- "program": "${workspaceRoot}/bin/js-debug/index.js",
- "stopOnEntry": false,
- "args": [],
- "cwd": "${workspaceRoot}/bin/js-debug",
- "preLaunchTask": null,
- "runtimeExecutable": null,
- "runtimeArgs": [
- "--nolazy"
- ],
- "env": {
- "NODE_ENV": "development"
- },
- "externalConsole": false,
- "sourceMaps": true,
- "outDir": "${workspaceRoot}/bin/js-debug"
- }
- ]
- }
- Flash Builder gives me an error when I try to compile.
- Here’s my ant config (I copied and modified the files from the examples):
- build.xml:
- <project name="PrintUIManagement" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="/FlexSDK/FlexJSNightly"/>
- <property name="example" value="PrintUIManagement" />
- <property file="${FLEXJS_HOME}/env.properties"/>
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
- <property name="opt2_arg" value="-remove-circulars" />
- <include file="${basedir}/build_example.xml" />
- <target name="main" depends="clean,build_example.compilejs" description="Clean build of ${example}">
- </target>
- <target name="clean">
- <delete dir="${basedir}/bin" failonerror="false" />
- <delete dir="${basedir}/bin-debug" failonerror="false" />
- <delete dir="${basedir}/bin-release" failonerror="false" />
- <delete dir="${basedir}/target" failonerror="false" />
- </target>
- </project>
- build_example.xml:
- <project name="build_example" basedir=".">
- <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
- <and>
- <not>
- <isset property="FALCON_HOME" />
- </not>
- <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
- <and>
- <not>
- <isset property="FALCON_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
- <and>
- <not>
- <isset property="FALCON_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
- <and>
- <not>
- <isset property="FALCONJX_HOME" />
- </not>
- <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
- <and>
- <not>
- <isset property="FALCONJX_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
- </and>
- </condition>
- <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
- <and>
- <not>
- <isset property="FALCONJX_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
- </and>
- </condition>
- <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
- <and>
- <not>
- <isset property="GOOG_HOME" />
- </not>
- <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
- </and>
- </condition>
- <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
- <and>
- <not>
- <isset property="GOOG_HOME" />
- </not>
- <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" type="file" />
- </and>
- </condition>
- <path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
- </path>
- <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <property name="theme_arg" value="-define=CONFIG::theme,false" />
- <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
- <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
- <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
- <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
- fork="true">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="-debug=true" />
- <arg value="${theme_arg}" />
- <arg value="-compiler.mxml.children-as-data" />
- <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
- <arg value="${extlib_arg}" />
- <arg value="${opt1_arg}" />
- <arg value="${opt2_arg}" />
- <arg value="-js-output-type=FLEXJS" />
- <arg value="-closure-lib=${GOOG_HOME}" />
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
- <arg value="-external-library-path=typedefs"/>
- <arg value="${basedir}/src/${example}.mxml" />
- </java>
- <fail>
- <condition>
- <not>
- <or>
- <equals arg1="${errorCode}" arg2="0" />
- <equals arg1="${errorCode}" arg2="2" />
- </or>
- </not>
- </condition>
- </fail>
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment