Export a release version of an application

After you have finished creating your application and want to publicly release it, you can export a release version of your application. Flash Builder’s Export Release Build wizard creates an optimized release-quality version (non-debug SWF file or AIR file) of your application.

Depending on the type of application, the wizard guides you through steps to customize and optimize packaging.

After running the wizard, additional steps are required to deploy your application on a server.

Export a web application (runs in Adobe Flash player)

  1. Select Project > Export Release Build to open the Export Release Build wizard.

  2. Select the project and application you want to export.

  3. (Optional) Select Enable View Source to make application source files available from the exported application.

    Click View Source Files to specify which source files to include. In addition to the specified source files, the wizard generates a ZIP archive file containing the source files.

    Important: For server projects, you can select the services folder when exporting source files. Exporting files that implement services have security implications. These files can expose access to your database, including user names and passwords. See Exporting source files with release version of an application.
  4. Click Finish.

  5. Copy the folder containing the exported release to the web root of the server hosting the application.

  6. (Server projects) If exporting a release from a project that specified an application server type, deploy the services and other server-side files to the web root of the target server.

    Maintain the same directory structure used during development.

    This step applies to ColdFusion, PHP, BlazeDS, and Data Services. You specify the application server type when creating a project in Flash Builder.

    If the application server is on a different host than the deployed application, a cross-domain policy file is necessary to access these services. This applies to projects accessing static XML service files or local files for HTTP services or web services. See Using cross-domain policy files.

  7. (PHP server projects only) For PHP projects, perform these additional steps:

    1. Install the Zend framework on the server. See Installing Zend Framework.

    2. Modify the amf-config.ini file, which is in the output folder of the exported release:

      For zend_path, specify the absolute path to the Zend installation directory.

      Set amf.production to true.

      Update webroot with the absolute path to the web root on the server.

Export a desktop application (runs in Adobe AIR)

  1. (Optional) Change the server settings in the project properties.

    An exported desktop application can only access services used during development. If you want to change the server for the exported desktop application, modify the project settings.

  2. Select Project > Export Release Build to open the Export Release Build wizard.

  3. Select the project and application you want to export.

    Note: For AIR applications, Flash Builder cannot make application source files available from the exported application.
  4. Specify the location to export the project. The default location is inside your project folder.

  5. To export your Adobe AIR application, digitally sign your build by selecting one of the following:

    • Signed AIR Package to export a digitally signed AIR package

    • Signed Native Installer to create a digitally signed installer for the target platform, either Windows or Mac OS X

    • Signed Application With Runtime Bundled to export the application with the Adobe AIR runtime bundled within the application.

    • Intermediate AIRI package to export a file that can be signed later.

    Click Next.

    For more information about digital signage, see the Adobe Flash Builder documentation at Digitally sign your Adobe AIR applications

  6. On the Digital Signature page:

    Specify the digital certificate that represents the application publisher’s identity. To generate a self-signed certificate, click Create and enter data in the required fields.

  7. On the Package Contents page, select the output files to include in the AIR or AIRI file.

  8. Click Finish.

  9. Copy the .air project to the target desktop.

  10. (Server projects) If exporting a release from a project that specified an application server type, deploy the services on the target server.

    This step applies to ColdFusion, PHP, BlazeDS, and LCDS services. You specify the application server type when creating a project in Flash Builder.

  11. (PHP server projects only) For PHP projects, perform these additional steps:

    1. Install the Zend framework on the server. See Installing Zend Framework.

    2. Modify the amf-config.ini file, which is in the output folder of the exported release:

      For zend_path, specify the absolute path to the Zend installation directory.

      Set amf.production to true.

      Update webroot with the absolute path to the web root on the server.

Create an intermediate AIR file

You can create an intermediate AIR file that can be signed later. Use this option for testing only.

  1. Select Project > Export Release Build.

    Select the Adobe AIR project to export and the file to export the project to. Click Next.

  2. Select Export an Intermediate AIRI File That Will Be Signed Later option.

  3. (Optional) Click Next. Select output files to include in the exported AIRI file.

    By default, all the files are included.

  4. Click Finish.

    After you have generated an intermediate AIR file, it can be signed using the AIR Developer Tool (ADT). For information on the ADT command line tool, see Signing an AIR intermediate file with ADT in the Adobe AIR documentation.

For more information about using the AIR Developer Tool (ADT), see the Adobe AIR documentation at www.adobe.com/go/learn_fbairdevelopertool_en.

Running an application with captive runtime

Depending on whether you are exporting the package with the Adobe AIR runtime bundled to Windows or Mac, you have different procedures to run the application after final deployment.

On Windows

 The application package contains the required application files and the runtime to run the application. Users can run the application immediately after packaging. You can also choose to use third-party tools to create a Windows Installer (MSI) from the exported application package.

On Mac

 To run the application, drag the application package into the Applications folder.

Change Flex projects to Adobe AIR projects

You can change the application type of a Flex project from Web (runs in Flash Player) to Desktop (runs in Adobe AIR). The following changes are made during the conversion:

  • An AIR descriptor file is created for each application in the project.

  • The launch configurations for the project are updated to properly launch in Adobe AIR.

  • Settings for HTML wrapper are removed.

  • Custom Flash Player settings are removed.

  • The library path is modified to include airglobal.swc instead of playerglobal.swc.

During conversion, you can specify whether to change the base Application tags to WindowedApplication tags for each application in the project. If you choose to convert these tags, this is the only change to application code that occurs during conversion. After the conversion, inspect the attributes to the base tags to make sure that the application runs as intended in Adobe AIR.

Change a web application project to a desktop application

  1. Select the project that you want to convert.

    The project should be a Flex project with the Web application type (runs in Flash Player)

  2. From the context menu for the project, select Add/Change Project Type > Convert to Desktop/Adobe AIR project.

  3. In the Convert to Desktop/Adobe AIR Project dialog, specify whether to rewrite code:

    • Convert Application Tags to WindowedApplication Tags

      For existing applications in the project, all Application tags are rewritten to WindowedApplication tags. No other change to your code occurs. Inspect attributes to the base tags to make sure that the application runs as intended in Adobe AIR.

      New applications you create in the project are desktop applications and can run in Adobe AIR.

    • Do Not Rewrite Any Code

      No changes are made to your code. Edit any applications in the project before they can run in Adobe AIR.

      New applications you create in the project are desktop applications and can run in Adobe AIR.

Note: This procedure cannot be undone.

Export a mobile application (runs in Adobe AIR)

  1. Select Project > Export Release Build to open the Export Release Build wizard.

  2. Select the project and application that you want to export.

  3. Select the target platforms.

  4. Specify the location to export the project. You can export the project to a target desktop or to a connected device.

    Select Keep Bin-Release-Temp Folder to retain the bin-release-temp folder within the project’s workspace. For more information, see Retain bin-release-temp folder and dSYM folder.

  5. The base filename is the name of the project, by default. You can change the filename, if necessary.

  6. To package your application with a digital signature for each target platform, select Signed Packages For Each Target Platform.

    To package your application as a digitally signed Adobe AIR application for the desktop, select Signed AIR Package For Installation On Desktop.

    If you want to export a file that can be signed later, export an intermediate AIRI file.

    To generate a self-signed certificate, click Create to enter data in the required fields.

    Click Next.

    For more information about digital signage, see the Adobe Flash Builder documentation Digitally sign your Adobe AIR applications

  7. On the Packaging Settings page, you can specify the digital certificate and the package contents. Depending on the target platform, the settings vary. These settings are used when packaging an application using the Run/Debug or Export Release Build workflows.

    In the Digital Signature page, specify the P12 digital certificate that represents the application publisher’s identity. You can also specify a password for the selected certificate.

    For the Apple iOS platform, convert the Apple iPhone certificate to the P12 file format and select a provisioning file. To do so, you must first obtain an iPhone developer certificate and a mobile provisioning profile from Apple.

    For more information, see Prepare to build, debug, or deploy an iOS application.

    You can then choose to deploy the final release package to the Apple App store or as an ad-hoc package for limited distribution.

    In the Package Contents page, select the output files that you want to include in the final version of your application.

    Note: You cannot exclude the SWF file and the application descriptor file as they are required for exporting a valid package.
    The following files are not needed and hence are automatically deselected or hidden:
    • .ipa files

    • certificate files (.p12, .pfx, .provisioning)

    • .air, .airi files

    For the Google Android platform, Select Install And Launch Application On Any Connected Devices to export the project to a connected device. The exported application installs on the device.

    If Adobe AIR is not already installed on a user’s device, you can select or specify a URL to download Adobe AIR for the application package. The default URL points to a location on the Android App store. You can, however, override the default URL and select the URL that points to a location on the Amazon Appstore, or enter your own URL.

  8. Click Finish.

For more information, see Packaging and exporting.