Guest User

Untitled

a guest
Nov 21st, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.45 KB | None | 0 0
  1. Here’s my config in asconfig.json:
  2. {
  3. "config": "flex",
  4. "compilerOptions": {
  5. "debug": true,
  6. "js-output-type": "flexjs",
  7. "source-map": true,
  8. "external-library-path": [
  9. "typedefs"
  10. ]
  11. },
  12.  
  13. "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
  14. "files":
  15. [
  16. "src/PrintUIManagement.mxml"
  17. ]
  18. }
  19.  
  20. tasks.json:
  21. {
  22. // See https://go.microsoft.com/fwlink/?LinkId=733558
  23. // for the documentation about the tasks.json format
  24. "version": "0.1.0",
  25. "command": "asconfigc",
  26. "isShellCommand": true,
  27. "args": [
  28. "--flexHome=/Users/harbs/Documents/Apache Flex Dist/FlexJSNightly"
  29. ],
  30. "showOutput": "always"
  31. }
  32.  
  33. launch.json:
  34. {
  35. "version": "0.2.0",
  36. "configurations": [
  37. {
  38. "name": "NextGenAS Node.js Launch",
  39. "type": "node",
  40. "request": "launch",
  41. "program": "${workspaceRoot}/bin/js-debug/index.js",
  42. "stopOnEntry": false,
  43. "args": [],
  44. "cwd": "${workspaceRoot}/bin/js-debug",
  45. "preLaunchTask": null,
  46. "runtimeExecutable": null,
  47. "runtimeArgs": [
  48. "--nolazy"
  49. ],
  50. "env": {
  51. "NODE_ENV": "development"
  52. },
  53. "externalConsole": false,
  54. "sourceMaps": true,
  55. "outDir": "${workspaceRoot}/bin/js-debug"
  56. }
  57. ]
  58. }
  59.  
  60. Flash Builder gives me an error when I try to compile.
  61.  
  62. Here’s my ant config (I copied and modified the files from the examples):
  63.  
  64. build.xml:
  65. <project name="PrintUIManagement" default="main" basedir=".">
  66. <property name="FLEXJS_HOME" location="/FlexSDK/FlexJSNightly"/>
  67. <property name="example" value="PrintUIManagement" />
  68.  
  69. <property file="${FLEXJS_HOME}/env.properties"/>
  70. <property environment="env"/>
  71. <property file="${FLEXJS_HOME}/build.properties"/>
  72. <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
  73. <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
  74. <property name="opt2_arg" value="-remove-circulars" />
  75.  
  76. <include file="${basedir}/build_example.xml" />
  77.  
  78. <target name="main" depends="clean,build_example.compilejs" description="Clean build of ${example}">
  79. </target>
  80.  
  81. <target name="clean">
  82. <delete dir="${basedir}/bin" failonerror="false" />
  83. <delete dir="${basedir}/bin-debug" failonerror="false" />
  84. <delete dir="${basedir}/bin-release" failonerror="false" />
  85. <delete dir="${basedir}/target" failonerror="false" />
  86. </target>
  87. </project>
  88.  
  89. build_example.xml:
  90. <project name="build_example" basedir=".">
  91.  
  92. <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
  93. <and>
  94. <not>
  95. <isset property="FALCON_HOME" />
  96. </not>
  97. <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
  98. </and>
  99. </condition>
  100.  
  101. <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
  102. <and>
  103. <not>
  104. <isset property="FALCON_HOME" />
  105. </not>
  106. <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
  107. </and>
  108. </condition>
  109.  
  110. <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
  111. <and>
  112. <not>
  113. <isset property="FALCON_HOME" />
  114. </not>
  115. <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
  116. </and>
  117. </condition>
  118.  
  119. <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
  120. <and>
  121. <not>
  122. <isset property="FALCONJX_HOME" />
  123. </not>
  124. <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
  125. </and>
  126. </condition>
  127.  
  128. <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
  129. <and>
  130. <not>
  131. <isset property="FALCONJX_HOME" />
  132. </not>
  133. <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
  134. </and>
  135. </condition>
  136.  
  137. <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
  138. <and>
  139. <not>
  140. <isset property="FALCONJX_HOME" />
  141. </not>
  142. <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
  143. </and>
  144. </condition>
  145.  
  146. <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
  147. <and>
  148. <not>
  149. <isset property="GOOG_HOME" />
  150. </not>
  151. <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
  152. </and>
  153. </condition>
  154.  
  155. <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
  156. <and>
  157. <not>
  158. <isset property="GOOG_HOME" />
  159. </not>
  160. <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" type="file" />
  161. </and>
  162. </condition>
  163.  
  164. <path id="lib.path">
  165. <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
  166. </path>
  167.  
  168.  
  169. <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
  170. <echo message="Compiling ${example}.js"/>
  171. <echo message="FLEX_HOME: ${FLEX_HOME}"/>
  172. <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
  173. <echo message="GOOG_HOME: ${GOOG_HOME}"/>
  174. <property name="theme_arg" value="-define=CONFIG::theme,false" />
  175. <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
  176. <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
  177. <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
  178.  
  179. <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
  180. fork="true">
  181. <jvmarg line="${mxmlc.jvm.args}"/>
  182. <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
  183. <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
  184. <arg value="-debug=true" />
  185. <arg value="${theme_arg}" />
  186. <arg value="-compiler.mxml.children-as-data" />
  187. <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
  188. <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
  189. <arg value="-compiler.binding-value-change-event-type=valueChange" />
  190. <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
  191. <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
  192. <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
  193. <arg value="${extlib_arg}" />
  194. <arg value="${opt1_arg}" />
  195. <arg value="${opt2_arg}" />
  196. <arg value="-js-output-type=FLEXJS" />
  197. <arg value="-closure-lib=${GOOG_HOME}" />
  198. <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
  199. <arg value="-external-library-path=typedefs"/>
  200. <arg value="${basedir}/src/${example}.mxml" />
  201. </java>
  202. <fail>
  203. <condition>
  204. <not>
  205. <or>
  206. <equals arg1="${errorCode}" arg2="0" />
  207. <equals arg1="${errorCode}" arg2="2" />
  208. </or>
  209. </not>
  210. </condition>
  211. </fail>
  212. </target>
  213.  
  214.  
  215.  
  216. </project>
Advertisement
Add Comment
Please, Sign In to add comment