如何确定MXMLC编译的文件 [英] How to determine what files MXMLC compiles

查看:222
本文介绍了如何确定MXMLC编译的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种方法来以编程方式记录MXMLC编译中使用的源文件。理想情况下,会有一个标志传递给MXMLC,让它报告编译的源文件的完整列表,但似乎没有这样的标志。看来一般你只是传递一个main.mxml文件到MXMLC,它离开并编译它需要的一切,而不告诉你它在做什么。据我所知,你也不能明确地列出文件来编译;它将自动解析引用并编译引用的源,而无需以任何方式控制其行为或报告。



如果编译器无法提供此信息,并且用户无法控制此行为,我可以想到的唯一的其他选择是写我自己的MXML的源代码扫描器,将遍历代码树中的所有引用,以给出一个报告MXMLC 应该编译,虽然这显然是错误很容易,肯定不是我期待的东西。



当然,因为我没有很多Flex的经验,可能有一个明显的答案



感谢

解决方案

您在链接报告中的后续操作:



将此参数添加到您的编译器参数中:

  -link-report output.xml 

,因此还有一个便捷的AIR工具用于解析结果。 p>

I need a way to programmatically record what source files are consumed in an MXMLC compile. Ideally there would be a flag to pass to MXMLC to have it report the complete list of source files it is compiling, but there doesn't seem to be such a flag. It seems generally you just pass a main.mxml file to MXMLC and it goes off and compiles everything it needs to without telling you what it's doing. As far as I can tell, you also cannot explicitly list the files for it to compile; it will resolve references automatically and compile referenced sources without any way to control that behavior or report on it.

If the compiler cannot supply this information and a user cannot control this behavior, the only other option I can think of is write my own source code scanner for MXML that will traverse all the references in a code tree to give a report of what MXMLC should be compiling, though that's obviously error prone and certainly not something I'm looking forward to.

Of course, since I don't have a whole lot of experience with Flex, there may be an obvious answer that I'm missing.

Thanks

解决方案

You should find what you're after in the link report:

Add this param to your compiler arguments:

-link-report output.xml

It gives you a tonne of information, so there's also a handy AIR tool for parsing the results.

这篇关于如何确定MXMLC编译的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆