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;
精彩评论