0

我的 ant 构建文件告诉 mxmlc.jar 重新编译目标 mxml 源。但是,如果目标 mxml 源文件未更改,则 ant 或 mxmlc 将忽略该文件并且不会创建新的 swf。这很烦人,因为我正在编辑由目标 mxml 导入的文件。当这些文件发生变化时,我需要它来重建。我猜测 mxmlc 正在某处创建一个缓存文件并比较目标 mxml(或者可能只是一个哈希)。这是正在发生的事情吗?标准的解决方法是什么?目前,我正在编辑目标 mxml 只是为了导致文件更改。

4

2 回答 2

1

是的,flex SDK 为每个组件的编译字节码创建一个缓存文件。

这是有关缓存文件的 livedocs 参考的链接

http://livedocs.adobe.com/flex/3/html/compilers_20.html#153980

正如它所指出的:“强制完全重新编译的一种方法是从目录中删除缓存文件。”

所以是的,您可以删除缓存以强制重新编译所有文件。
你也可以只做一个“干净”的编译你也可以只设置编译器选项 -incremental=false

于 2011-06-21T16:14:31.963 回答
1

Does Flex SDK’s mxmlc create a cache file or hash to determine if source code has changed?

All that is required to know if a file has changed or not is to look at the last modification time.

I need it to rebuild when those files change. I'm guessing that the mxmlc is creating a cache file somewhere and comparing the target mxml (or maybe just a hash).

A clean build should work fine if it's not too expensive.

于 2009-10-23T00:34:42.970 回答