Created
June 30, 2010 14:49
-
-
Save jankeesvw/458749 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Create version file" default="Create version.as file" basedir="../../"> | |
<target name="Create version.as file"> | |
<tstamp> | |
<format property="TODAY" pattern="dd/MM/yyyy - HH:mm" locale="en,UK" /> | |
</tstamp> | |
<echo file="flash/source/Version.as">package { | |
import flash.display.Sprite; | |
import flash.ui.ContextMenu; | |
import flash.ui.ContextMenuItem; | |
public class Version | |
{ | |
public static var DATE:String = "${TODAY}"; | |
public static var PROJECT_NAME:String = "Musis"; | |
public static var BUILT_ON:String = "${os.name} ${os.version}"; | |
public function Version(inContextMenuSprite : Sprite) { | |
var cm : ContextMenu = new ContextMenu(); | |
cm.hideBuiltInItems(); | |
cm.customItems.push(new ContextMenuItem("Project: " + PROJECT_NAME)); | |
cm.customItems.push(new ContextMenuItem("Date: " + DATE)); | |
cm.customItems.push(new ContextMenuItem("Built on: " + BUILT_ON)); | |
inContextMenuSprite.contextMenu = cm; | |
} | |
public static function toString():String { | |
return "[DATE: " + Version.DATE + ", BUILT_ON: " + BUILT_ON + "]"; | |
} | |
} | |
}</echo> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment