【问题标题】:Creating a release build with Ant not outputing all files?使用 Ant 创建发布版本不输出所有文件?
【发布时间】:2012-10-19 18:29:12
【问题描述】:

我正在尝试创建一个 Ant 任务来创建发布版本,但它只输出一个 SWF 文件,并且 SWF 文件的大小比正常的小,并且它不会从正常的 Flash Builder 发布版本中输出所有正常文件例如历史文件夹、项目资产、SDK RSL 等。

<!-- 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)

【问题讨论】:

    标签: apache-flex ant flex4


    【解决方案1】:

    mxmlc 任务只编译弹性模块。您必须分别管理历史文件夹和项目资产。 html-wrapper 任务可以帮助您顺利完成任务,它从 html 模板生成 html 包装器。

    【讨论】:

    • 我也是这么想的。我最终想出了一个脚本来复制它丢失的文件。
    • 我最终使用了 元素来处理我所有的 rsls,并根据这个人的 work 编写了一个包装器创建者脚本。保留我的自定义模板。缺点是我必须手动复制我所有的东西并使用正则表达式来填写模板。您听起来好像很久以前就已经弄清楚了,所以我主要提供在解决类似问题时我发现有用的背景
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-19
    相关资源
    最近更新 更多