Requirements
Prerequisite knowledge
Basic familiarity of ActionScript and building of apps with flash content
Required products
Adobe Flash Builder
User level
Intermediate
 

 

Introduction

With the release of AIR 29, a combined AIR SDK for packaging 32-bit and 64-bit captive applications is available for Windows platform. The combined SDK provides developers with the ability to create 32-bit or 64-bit captive AIR applications using the same AIRSDK. However, this new functionality only impacts captive applications. Native and shared applications will continue to only be supported as 32-bit applications on Windows.

 

Deciding the architecture of AIR applications

The workflow for building 32-bit vs. 64-bit using the combined AIRSDK is different for Adobe Flash Builder and Adobe Animate/adt.
 
  • Packaging using Adobe Animate and adt:
With Adobe Animate and adt the desired application architecture is selected by adding the <architecture> tag to the application descriptor file. The value of this tag can be either “32” for packaging 32-bit captive AIR applications or “64” for packaging 64-bit captive AIR applications.
The <architecture> tag should be added under the <application>  tag. If the <architecture> tag is omitted from the descriptor file the application will default to 32-bit. Here is a sample app-xml:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/29.0">
    <id>Sample</id>
    <filename>Sample</filename>
    <architecture>64</architecture>
    <name>Sample</name>
    <versionNumber>0.0.0</versionNumber>
    <initialWindow>
        <content>Sample.swf</content>
        <autoOrients>false</autoOrients>
        <fullScreen>false</fullScreen>
        <visible>true</visible>
    </initialWindow>
</application>

 

  • Packaging using Adobe Flash Builder:
With Adobe Flash Builder the desired application architecture is set by adding the Windows environment variable AIR_WIN_ARCH before launching the Adobe Flash Builder. To build a 64-bit application set the variable to 64. To build a 32-bit application set the variable to 32. If the AIR_WIN_ARCH environment variable is not set the application will default to 32-bit. Setting the  tag will have no impact on applications packaged by Adobe Flash Builder.
Packaging of shared and native AIR application will not beaffected by the any of the above-mentioned methods. They will continue to be supported as 32-bit applications on Windows.

 

Support for 64-bit native extensions

To create a 64-bit captive AIR application with native extension, a 64-bit ANE needs to be created.
 
  • Library and Frameworks
To support creation of 64-bit native extensions you need to add the following files to the native framework in the Microsoft Visual Studio:
 
FlashRuntimeExtensions.lib, inside the AIRSDK_Compiler >lib >win64 folder.
FlashRuntimeExtensions.h, inside the AIRSDK_Compiler >includes folder.
Console Application Property Pages

 

  • Packaging the native Extension.

To package the 64-bit native extension, the platform value to be passed inside the extension descriptor file and in the command used to create the ANE should be ‘Windows-x86-64’. The structure for extensions descriptor will be as follows:

<platforms>
    <platform name="Windows-x86-64">
        <applicationDeployment>
            <nativeLibrary>...</nativeLibrary>
            <initializer>...</initializer>
            <finalizer>...</finalizer>
        </applicationDeployment>
    <platform>
</platforms>

And the packaging command would be:

adt -package -target ane path/where/you/want/YourANE.ane YourExtensionDescriptor.xml -swc YourAIRLibrary.swc -platform Windows-x86-64 library.swf YourNativeWindowsFramework

 

Linking ANE using Flash Builder 4.7

Upon linking the AIR application with the 64-bit ANE, a false error will be reported by Flash Builder 4.7. The error will appear as a red ‘X’ next to the ANE file entry in the Build Paths dialog box (see
figure below). The error reads “This ANE does not support air-native-win32 platform”. Please ignore this error as it is due to a bug in Flash Builder 4.7. You can verify that the ANE supports the desired Windows-x86-64 platform by clicking the triangle next to Targets.

ActionScript Build Path
 
The red ‘X’ issue is observed again when ANE is packaged by including the ANE in ActionScript Build Packaging. Ignore the error and click OK.
ActionScript Build Packaging
 
On exporting the native application using the Project->Export Release Build, Flash Builder displays a packaging error. To continue with app creation, check select ‘Ignore Errors’ in Native Extensions tab and click Finish. Your application will be created successfully.
Packaging Settings