2

在 Adob​​e Flex 文件中编译 swf 文件时如何监控 swf 文件中的版本?

4

1 回答 1

4

假设我正确理解了您的问题,您应该查看我的这篇博客文章,标题为“使用 Flex 应用程序保存和访问版本/编译信息”,其中继续解释了如何使用 mxmlc 编译器中的条件编译功能来保存变量值到已编译的二进制文件中,然后将它们打印到应用程序本身的日志(或显示在用户界面中)。

以下是该帖子的相关片段:

# Compiling the binary with the conditional compilation parameter:
/path/to/mxmlc -define+=DEBUG::compiled,"Fri_Sep_12_17:26:13_on_Alis-MacBook.local" -strict=true /path/to/myApp.mxml

// Printing out the "compiled" value in the application code:
var DEBUG:Namespace = new Namespace("DEBUG");
var compiledStr:String = DEBUG::compiled;
trace("SWF was compiled: "+compiledStr);

就实际的“版本号”而言,我只使用了三件事:

  • 编译日期(有关如何自动执行此操作的信息,请参阅帖子中的示例脚本)
  • 编译它的计算机的主机名(也在帖子中演示)
  • 工作副本的 SVN 修订版(有关如何获取 SVN 修订号的信息,请参阅我对此问题的回答)
于 2008-11-03T11:22:22.000 回答