Here is 5 steps Alchemy installation guide for Windows. It was tested under Windows XP Professional and Windows 7 Home Edition.
Step 1: Downloading
Dowload the following resources:
Official getting started says that you need Flex SDK 3.2 but it works fine with higher SDKs.
Step 2: Installing and extracting
- Install Java
- Instal Cygwin to c:/alchemy/cygwin
- Extract Alchemy to c:/alchemy/alchemy0.5a
- Extract Flex SDK to c:/alchemy/flex4.5
Step 3: Setting Cygwin paths
- Open Cygwin console. If you do it for the first time your home directory will be created in c:/alchemy/cygwin/home/$USER.
- Edit c:/alchemy/cygwin/home/.bashrc file and add the following code at the end of it:
export FLEX_HOME=/cygdrive/c/alchemy/flex4.5/bin
export ALCHEMY_HOME=/cygdrive/c/alchemy/alchemy0.5a
source /cygdrive/c/alchemy/alchemy0.5a/alchemy-setup
PATH=$ALCHEMY_HOME/achacks:$FLEX_HOME:$PATH
export PATH - Restart console. You will get the following warning but ignore it (alchemy-setup will be created in the next step):
bash: /cygdrive/c/alchemy/alchemy0.5a/alchemy-setup: No such file or directory
Type:
echo $PATHand check if you have the following paths at the beginning of your $PATH variable:
/cygdrive/c/alchemy/alchemy0.5a/achacks
/cygdrive/c/alchemy/flex4.5/bin
Step 4: Configuring Alchemy
- Open Cygwin console, go to Alchemy home directory:
cd $ALCHEMY_HOME
and run configuration script:
./config - Edit c:/achemy/alchemy0.5a/alchemy-setup and under line:
#export ADL=/path/to/your/adl (or adl.exe)
add
export ADL=/cygdrive/c/alchemy/flex4.5/bin/adl.exe - Go to the $ALCHEMY_HOME/bin directory:
cd $ALCHEMY_HOME/bin
- Restart Cygwin console and type again:
echo $PATH
and this time you shoud have one more path printed:
/cygdrive/c/alchemy/alchemy0.5a/binType:
which gccand you should get:
/cygdrive/c/alchemy/alchemy/0.5a/achacks/gcc
and create symbolic link to the llvm-stub.exe:
Step 5: Compiling C program into SWC
-
Go to the directory with sample C programs:
and type:
You should get output similar to:
3144.achacks.swf, 261075 bytes written
frame rate: 60
frame count: 1
69 : 4
72 : 261005
76 : 33
1 : 0
0 : 0
frame rate: 24
frame count: 1
69 : 4
77 : 506
64 : 31
63 : 16
65 : 4
9 : 3
41 : 26
82 : 471
1 : 0
0 : 0
adding: catalog.xml (deflated 75%)
adding: library.swf (deflated 70%)
Thx! Just think the official one is too complicated ~
Perfect! Thank you very much.