开发者

Embeding compilation date into source (Like C __DATE__)

开发者 https://www.devze.com 2023-02-01 15:48 出处:网络
Is it possible to开发者_如何学Python embed compilation date into compiled Action Script 3 file (like in C\'s __DATE__ preprocessor constant)?

Is it possible to开发者_如何学Python embed compilation date into compiled Action Script 3 file (like in C's __DATE__ preprocessor constant)?

Is it possible to do it with custom date format?

I am using Flex for compilation


Joony's answer will work, but it's a bit of a hack. I don't know if it's officially supported.

If you are compiling with Ant (or command line or other script) then you can pass the date as a compiler argument.

Compiler arg:

 mxmlc -define+=CONFIG::compiledAt,'2011-01-17 17:05:01'

AS3 code:

 public static const COMPILED_AT:String = CONFIG::compiledAt;
0

精彩评论

暂无评论...
验证码 换一张
取 消