1
我想創建一個Ant任務來創建一個發佈版本,但它只輸出一個SWF文件,並且該SWF文件的大小比正常小,並且不會輸出普通Flash Builder發佈版本的所有普通文件作爲歷史文件夾,項目資產,SDK RSL等。使用Ant創建發佈版本不會輸出所有文件?
<!-- Build and output the Avenue.swf-->
<target name="compileFlex" depends="init,compileLib1,compileLib2">
<mxmlc file="${APP_SRC}/app.mxml" output="output/app.swf">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<include-libraries file="${LIB1_SWC}" append="true"/>
<include-libraries file="${LIB2_SWC}" append="true"/>
</mxmlc>
</target>
它創建一個SWF,沒有別的。
下面是輸出的一部分:
[mxmlc] Required RSLs:
[mxmlc] http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/framework_4.5.1.21489.swz with 1 failover.
[mxmlc] http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz with 1 failover.
[mxmlc] http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/spark_4.5.1.21489.swz with 1 failover.
[mxmlc] http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/sparkskins_4.5.1.21328.swz with 1 failover.
[mxmlc] http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/rpc_4.5.1.21328.swz with 1 failover.
[mxmlc] http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/mx_4.5.1.21489.swz with 1 failover.
[mxmlc] /Users/.../output/app.swf (698490 bytes)
我覺得它一樣多。我最終想出了一個腳本來複制缺少的文件。 –
我最終使用元素來處理所有的rsls,並根據這個人的[作品]編寫了一個包裝器創建者腳本(http://ruprict.net/2009/08/04/continuous-integration-with-flex-hudson-and-arcgis-server-part-2 /) 好處是我必須保留我的自定義模板。缺點是我必須手動複製我所有的東西,並使用正則表達式來填充模板。你聽起來好像很早以前就已經發現它了,所以我主要給出的背景是在爭論類似問題時找到有用的背景 –
monknomo