Guest User

build_example.xml

a guest
Jan 29th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.98 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <project name="build_example" basedir=".">
  17. <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
  18. <and>
  19. <not>
  20. <isset property="FALCON_HOME" />
  21. </not>
  22. <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
  23. </and>
  24. </condition>
  25. <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
  26. <and>
  27. <not>
  28. <isset property="FALCON_HOME" />
  29. </not>
  30. <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
  31. </and>
  32. </condition>
  33. <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
  34. <and>
  35. <not>
  36. <isset property="FALCON_HOME" />
  37. </not>
  38. <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
  39. </and>
  40. </condition>
  41. <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
  42. <and>
  43. <not>
  44. <isset property="FALCONJX_HOME" />
  45. </not>
  46. <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
  47. </and>
  48. </condition>
  49. <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
  50. <and>
  51. <not>
  52. <isset property="FALCONJX_HOME" />
  53. </not>
  54. <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
  55. </and>
  56. </condition>
  57. <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
  58. <and>
  59. <not>
  60. <isset property="FALCONJX_HOME" />
  61. </not>
  62. <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
  63. </and>
  64. </condition>
  65. <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
  66. <and>
  67. <not>
  68. <isset property="GOOG_HOME" />
  69. </not>
  70. <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
  71. </and>
  72. </condition>
  73. <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
  74. <and>
  75. <not>
  76. <isset property="GOOG_HOME" />
  77. </not>
  78. <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" type="file" />
  79. </and>
  80. </condition>
  81. <path id="lib.path">
  82. <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
  83. </path>
  84.  
  85. <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
  86. <echo message="Compiling ${example}.js"/>
  87. <echo message="FLEX_HOME: ${FLEX_HOME}"/>
  88. <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
  89. <echo message="env GOOG_HOME: ${env.GOOG_HOME}"/>
  90. <echo message="GOOG_HOME: ${GOOG_HOME}"/>
  91. <property name="theme_arg" value="-define=CONFIG::theme,false" />
  92. <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
  93. <property name="lib_arg" value="-define=CONFIG::extlib,false" />
  94. <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
  95. <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
  96. <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
  97. fork="true">
  98. <jvmarg line="${mxmlc.jvm.args}"/>
  99. <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
  100. <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
  101. <arg value="-debug=true" />
  102. <arg value="${theme_arg}" />
  103. <arg value="-compiler.mxml.children-as-data" />
  104. <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
  105. <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
  106. <arg value="-compiler.binding-value-change-event-type=valueChange" />
  107. <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
  108. <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
  109. <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
  110. <arg value="+playerglobal.version=${playerglobal.version}" />
  111. <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
  112. <arg value="${extlib_arg}" />
  113. <arg value="${lib_arg}"/>
  114. <arg value="${opt1_arg}" />
  115. <arg value="${opt2_arg}" />
  116. <arg value="-js-output-type=FLEXJS" />
  117. <arg value="-closure-lib=${GOOG_HOME}" />
  118. <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
  119. <arg value="${basedir}/src/${example}.mxml" />
  120. </java>
  121. <fail>
  122. <condition>
  123. <not>
  124. <or>
  125. <equals arg1="${errorCode}" arg2="0" />
  126. <equals arg1="${errorCode}" arg2="2" />
  127. </or>
  128. </not>
  129. </condition>
  130. </fail>
  131. </target>
  132. </project>
Advertisement
Add Comment
Please, Sign In to add comment