Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions schemas/asconfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@
"type": "object",
"additionalProperties": false,
"properties": {
"arch": {
"type": "string",
"description": "Specifies the CPU architecture to target on Windows.",
"pattern": "^(x86|x64)$"
},
"extdir": { "$ref": "#/definitions/airOptionsExtdir" },
"files": { "$ref": "#/definitions/airOptionsFiles" },
"output": { "$ref": "#/definitions/airOptionsOutput" },
Expand Down
6 changes: 5 additions & 1 deletion src/com/as3mxml/asconfigc/AIROptionsParser.as
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,15 @@ package com.as3mxml.asconfigc
{
setValueWithoutAssignment(AIROptions.AIR_DOWNLOAD_URL, options[platform][AIROptions.AIR_DOWNLOAD_URL], result);
}
//Android options end

//This option is commonly used for both Android and Windows
//Windows and Android options begin
if(overridesOptionForPlatform(options, AIROptions.ARCH, platform))
{
setValueWithoutAssignment(AIROptions.ARCH, options[platform][AIROptions.ARCH], result);
}
//Android options end
//Windows and Android options end

//NATIVE_SIGNING_OPTIONS begin
//these are *mobile* signing options only
Expand Down
13 changes: 13 additions & 0 deletions test/src/tests/AIROptionsTests.as
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ package tests
Assert.assertStrictlyEquals(result.indexOf(value), optionIndex + 1);
}

[Test]
public function testArchWindows():void
{
var value:String = "x64";
var args:Object = {};
args[AIRPlatformType.WINDOWS] = {}
args[AIRPlatformType.WINDOWS][AIROptions.ARCH] = value;
var result:Array = AIROptionsParser.parse(AIRPlatformType.WINDOWS, false, "application.xml", "test.swf", null, null, args);
var optionIndex:int = result.indexOf("-" + AIROptions.ARCH);
Assert.assertNotStrictlyEquals(optionIndex, -1);
Assert.assertStrictlyEquals(result.indexOf(value), optionIndex + 1);
}

[Test]
public function testResdir():void
{
Expand Down