Alchemy installation guide for Windows

July 22nd, 2011 by Piotr Wierzgała Leave a reply »

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:

  1. Java (JRE Windows x86),
  2. Cygwin,
  3. Alchemy,
  4. Flex SDK.

Official getting started says that you need Flex SDK 3.2 but it works fine with higher SDKs.

Step 2: Installing and extracting

  1. Install Java
  2. Instal Cygwin to c:/alchemy/cygwin
  3. Extract Alchemy to c:/alchemy/alchemy0.5a
  4. Extract Flex SDK to c:/alchemy/flex4.5

Step 3: Setting Cygwin paths

  1. Open Cygwin console. If you do it for the first time your home directory will be created in c:/alchemy/cygwin/home/$USER.
  2. 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
  3. 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 $PATH

    and 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

  1. Open Cygwin console, go to Alchemy home directory:
    cd $ALCHEMY_HOME

    and run configuration script:

    ./config
  2. 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
  3. Go to the $ALCHEMY_HOME/bin directory:
    cd $ALCHEMY_HOME/bin
  4. and create symbolic link to the llvm-stub.exe:

    ln -s llvm-stub llvm-stub.exe
  5. Restart Cygwin console and type again:
    echo $PATH

    and this time you shoud have one more path printed:

    /cygdrive/c/alchemy/alchemy0.5a/bin

    Type:

    which gcc

    and you should get:

    /cygdrive/c/alchemy/alchemy/0.5a/achacks/gcc

Step 5: Compiling C program into SWC

    Go to the directory with sample C programs:

    cd $ALCHEMY_HOME/samples/stringecho

    and type:

    gcc stringecho.c -O3 -Wall -swc -o stringecho.swc

    You should get output similar to:

    WARNING: While resolving call to function 'main' arguments were dropped!

    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%)
Advertisement

2 comments

  1. roy says:

    Thx! Just think the official one is too complicated ~

  2. Perfect! Thank you very much.

Leave a Reply

Flexmaniaks on Facebook