Flex SDK 的 mxmlc 是否创建缓存文件或哈希来确定源代码是否已更改?
我的 ant 构建文件告诉 mxmlc.jar 重新编译目标 mxml 源。但是,如果目标 mxml 源文件未更改,则 ant 或 mxmlc 会忽略该文件并且不会创建新的 swf。这很烦人,因为我正在编辑由目标 mxml 导入的文件。当这些文件发生变化时我需要它来重建。我猜测 mxmlc 正在某处创建一个缓存文件并比较目标 mxml (或者可能只是一个哈希值)。这是正在发生的事情吗?标准的解决方法是什么?目前,我正在编辑目标 mxml 只是为了引起文件更改。
My ant buildfiles tell mxmlc.jar to recompile target mxml source. However, if the target mxml source file has not changed, either ant or mxmlc is ignoring the file and will not create a new swf. This is an annoyance because I'm editing files imported by the target mxml. 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). Is this what is happening? What's the standard work-around? At the moment, I'm editing the target mxml just to cause a file change.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要知道文件是否已更改,只需查看上次修改时间即可。
如果不是太贵的话,干净的构建应该可以正常工作。
All that is required to know if a file has changed or not is to look at the last modification time.
A clean build should work fine if it's not too expensive.
是的,flex SDK 为每个组件的编译字节码创建一个缓存文件。
以下是有关缓存文件的 livedocs 参考链接
http://livedocs .adobe.com/flex/3/html/compilers_20.html#153980
正如它所指出的:
“强制完全重新编译的一种方法是从目录中删除缓存文件。”
所以是的,您可以删除缓存以强制重新编译所有文件。
您也可以只进行“干净”编译
您也可以只设置编译器选项 -incremental=false
Yes the flex SDKs create a cache file for the compiled byte code for each component.
Here is a link to the livedocs reference regarding the cache file
http://livedocs.adobe.com/flex/3/html/compilers_20.html#153980
As it notes:
"One way to force a complete recompile is to delete the cache file from the directory."
So yes you can delete the cache to force a recompile of all files.
You could also just do a "clean" compile
You can also just set the compiler option -incremental=false