Appendix D. Compiling Flex Applications on Linux Using the Command Line

In THIS CHAPTER

Install Flash Player 10

Install Java

Download the Flex 4 SDK

Create a Project Folder Structure

Add an MXML File

Add Environment Variables

Tweak the Project Configuration File

Create a Reusable Compiler Script in Bash

Compile and Test

Summary

Contributed by Matthew Sabath

In this appendix, we discuss the steps necessary to compile a Flex 4 project on a Linux system using Adobe’s free command-line compiler. Our example uses the Ubuntu 10.04 distribution with a default installation.

This tutorial walks you through the following processes:

  • Installing Flash Player 10

  • Installing Java

  • Downloading the Flex 4 SDK

  • Creating a workspace and a project folder structure

  • Adding a simple Flex MXML application file

  • Adding environment variables to the Linux shell

  • Arranging a project’s flex-config.xml file.

  • Creating a reusable Bash script to call the compiler

Install Flash Player 10

Before you can run Flex 4 applications on Linux, you need to install Flash Player 10. This can be accomplished using the Ubuntu Software Center.

Access Ubuntu Software Center by opening the Applications menu and selecting Ubuntu Software Center (Figure D-1).

Launching Ubuntu Software Center
Figure D-1. Launching Ubuntu Software Center

Warning

Some Linux users have experienced difficulties installing Flash Player 10 over the top of Flash Player 9. If you run into trouble later getting Flex 4 applications ...

Get Learning Flex 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.