The following instructions have been tested on Windows XP Professional SP2. Be sure that you've already downloaded the source code from the repository.
Download Cygwin's installer, setup.exe
, here and run it (Vista/IE7 users may need to right-click on the link and save the file locally before running it, as it may not run directly from clicking in the browser).
There is no official site from which to download Cygwin; the setup program offers a number of mirrors for you to choose. Some of them can be flaky, so if you have a problem, try a different mirror. We've had good luck with ftp://mirrors.kernel.org and http://mirrors.kernel.org.
When installing Cygwin, make sure the initial download (if downloading first without installing) and the actual installation both include the Subversion package, which is in the Devel category, or else you won't get the SVN command-line tools. (Alternatively, you can choose not to install them with Cygwin, and get a different implementation from elsewhere, but sticking with Cygwin's is likely simplest.) The zip and unzip packages, in the Archive category, may also be useful. Aside from those, you can accept the default installation settings.
Double-clicking C:\cygwin\Cygwin.bat opens a window in which you can enter command lines. You'll probably want to keep a shortcut to this somewhere convenient.
As of version 1.7, Cygwin no longer provides the option of setting the Default Text File Type to "DOS / Text", which we previously recommended setting. Instead, if you encounter problems with incompatible line ending characters when executing any bash shell script (such as the setup.sh file at the root of the Flex trunk or branch you're working in), simply run the Cygwin utility d2u on it (i.e., "d2u setup.sh
").
If you intend to build an older branch (e.g. branches/3.x
), you need J2SDK 1.4.2_14.
Sun has archived this particular release here. Click on the "Download J2SDK" link and accept the license agreement. Click the "Windows Offline Installation, Multi-language" link to download the installer, which is named j2sdk-1_4_2_14-windows-i586-p.exe.
Run this installer, which requires administrative permissions. You should accept all of the installer's defaults. The branch setup scripts assume that the J2SDK will be installed at C:\j2sdk1.4.2_14
. Wait until the installer completes, then restart your machine.
Sun has archived this particular release here. Click on the "Download JDK" link and accept the license agreement. Click the "Windows Offline Installation, Multi-language" link to download the installer, which is named jdk-1_5_0_13-windows-i586-p.exe.
Run this installer, which requires administrative permissions. You should accept all of the installer's defaults. The branch setup scripts assume that the JDK will be installed at C:\Program Files\Java\jdk1.5.0_13
. Wait until the installer completes, then restart your machine.
If you intend to build an older branch (e.g. branches/3.x
), you need Ant 1.6.2.
Download the Apache Ant Project's archived release of Ant 1.6.2 here and unzip it (Vista/IE7 users may need to right-click on the link and save the file locally before opening it, as it may unzip directly from clicking in the browser). . Put the apache-ant-1.6.2
folder that's inside the ZIP at the root of your C:
drive. Make sure that Ant's bin
folder is at C:/apache-ant-1.6.2/bin
.
Download the Apache Ant Project's archived release of Ant 1.7.0 here and unzip it (Vista/IE7 users may need to right-click on the link and save the file locally before opening it, as it may unzip directly from clicking in the browser). . Put the apache-ant-1.7.0
folder that's inside the ZIP at the root of your C:
drive. Make sure that Ant's bin
folder is at C:/apache-ant-1.7.0/bin
.
mm.cfg
Download mm.cfg
into your Windows home directory (C:\Documents and Settings\<username>
, or c:\Users\<username>
on Windows Vista or later). This file specifies
ErrorReportingEnable=1 TraceOutputFileEnable=1
If your system already has an mm.cfg
file, paste these two lines into it.
FlashPlayerTrust
Open the directory C:\WINDOWS\system32\Macromed\Flash
or c:\Windows\SysWOW64\Macromed\Flash
(depending on your flavor of Windows). If it doesn't already contain a directory named FlashPlayerTrust
, create one. Download FlexSDK.cfg
into FlashPlayerTrust
. Vista/IE7 users may need to save the file onto the desktop first and then copy it locally into this directory; saving into a folder in the WINDOWS\system32 hierarchy directly from IE7 may quietly fail due to the browser's security model.
This file simply contains
C:\
so that SWFs anywhere on your C:
drive are trusted to load local content. If you don't develop on C:
drive, change the drive letter or add additional lines. We actually recommend you change this to be as restrictive as possible to your dev environment, either just the SDK directory or perhaps a specific development directory. Opening up your system to / can allow malicious SWFs to access data they normally might not be able to.
Also note: If you are getting "Security Sandbox Violation" errors (e.g. when running ant checkintests
), you may need to use more specific directories than "C:\", e.g. "C:\dev\". You may put one on each line.
To test your setup, launch Cygwin, change your working directory to the trunk of the Flex SDK, and run its setup.sh
script:
cd flex/sdk/trunk source setup.sh
Execute
java -version
and confirm that Java 1.5.0_13 is being found.
Execute
ant -version
and confirm that Ant 1.7.0 is being found. If you see the warning "cygpath: can't convert empty path", you can ignore it.