Better handling of AIR version label/number
This commit is contained in:
@@ -199,6 +199,42 @@ class AIRPlatform extends FlashPlatform {
|
|||||||
var context = generateContext ();
|
var context = generateContext ();
|
||||||
context.OUTPUT_DIR = targetDirectory;
|
context.OUTPUT_DIR = targetDirectory;
|
||||||
|
|
||||||
|
var buildNumber = Std.string (context.APP_BUILD_NUMBER);
|
||||||
|
|
||||||
|
if (buildNumber.length <= 3) {
|
||||||
|
|
||||||
|
context.APP_BUILD_NUMBER_SPLIT = buildNumber;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
var major = null;
|
||||||
|
|
||||||
|
var patch = buildNumber.substr (-3);
|
||||||
|
buildNumber = buildNumber.substr (0, -3);
|
||||||
|
|
||||||
|
var minor = buildNumber.substr (-Std.int (Math.min (buildNumber.length, 3)));
|
||||||
|
buildNumber = buildNumber.substr (0, -minor.length);
|
||||||
|
|
||||||
|
if (buildNumber.length > 0) {
|
||||||
|
|
||||||
|
major = buildNumber.substr (-Std.int (Math.min (buildNumber.length, 3)));
|
||||||
|
buildNumber = buildNumber.substr (0, -major.length);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var buildNumberSplit = minor + "." + patch;
|
||||||
|
if (major != null) buildNumberSplit = major + "." + buildNumberSplit;
|
||||||
|
|
||||||
|
context.APP_BUILD_NUMBER_SPLIT = buildNumberSplit;
|
||||||
|
|
||||||
|
if (buildNumber.length > 0) {
|
||||||
|
|
||||||
|
LogHelper.warn ("Application build number " + buildNumber + buildNumberSplit + " exceeds 9 digits");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var iconSizes = [ 16, 32, 48, 128 ];
|
var iconSizes = [ 16, 32, 48, 128 ];
|
||||||
var icons = project.icons;
|
var icons = project.icons;
|
||||||
iconData = [];
|
iconData = [];
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<application xmlns="http://ns.adobe.com/air/application/25.0">
|
<application xmlns="http://ns.adobe.com/air/application/25.0">
|
||||||
<id>::APP_PACKAGE::</id>
|
<id>::APP_PACKAGE::</id>
|
||||||
<versionNumber>::APP_VERSION::</versionNumber>
|
<versionLabel>::APP_VERSION::</versionLabel>
|
||||||
|
<versionNumber>::APP_BUILD_NUMBER_SPLIT::</versionNumber>
|
||||||
<filename>::APP_FILE::</filename>
|
<filename>::APP_FILE::</filename>
|
||||||
<name>::APP_TITLE::</name>
|
<name>::APP_TITLE::</name>
|
||||||
<description>::APP_DESCRIPTION::</description>
|
<description>::APP_DESCRIPTION::</description>
|
||||||
|
|||||||
@@ -2277,6 +2277,7 @@ class CommandLineTools {
|
|||||||
|
|
||||||
if (field == "window-allow-high-dpi") property = "allowHighDPI";
|
if (field == "window-allow-high-dpi") property = "allowHighDPI";
|
||||||
if (field == "window-color-depth") property = "colorDepth";
|
if (field == "window-color-depth") property = "colorDepth";
|
||||||
|
if (field == "meta-build-number") property = "buildNumber";
|
||||||
|
|
||||||
var fieldReference = Reflect.field (overrides, fieldName);
|
var fieldReference = Reflect.field (overrides, fieldName);
|
||||||
|
|
||||||
@@ -2300,6 +2301,11 @@ class CommandLineTools {
|
|||||||
|
|
||||||
Reflect.setField (fieldReference, property, argValue);
|
Reflect.setField (fieldReference, property, argValue);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// TODO: Only certain properties?
|
||||||
|
Reflect.setField (fieldReference, property, argValue);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user