Skip icon generation for Mac target when possible as well

This commit is contained in:
Joshua Granick
2015-01-07 22:52:06 -08:00
parent 8a7cc34848
commit d22f377a0b

View File

@@ -57,6 +57,31 @@ class IconHelper {
public static function createMacIcon (icons:Array <Icon>, targetPath:String):Bool {
try {
var useCache = FileSystem.exists (targetPath);
if (useCache) {
var iconTime = FileSystem.stat (targetPath).mtime.getTime ();
for (icon in icons) {
if (FileSystem.exists (icon.path) && FileSystem.stat (icon.path).mtime.getTime () > iconTime) {
useCache = false;
break;
}
}
if (useCache) return true;
}
} catch (e:Dynamic) {}
var out = new BytesOutput ();
out.bigEndian = true;