Build

From Openzet

Jump to: navigation, search

Contents

Overview

This overview outlines how to build SWC and ASdoc files after you download OpenZet framework. To facilitate building process, we provide the framework along with ant scripts.
If you have not previously installed ant, you need to install it first before starting to build OpenZet framework.

ANT

Download

The donload link is the following : http://ant.apache.org/bindownload.cgi

You need to download a version suited for your OS type. Lastest version of ant for today (Feb, 2009) is 1.7.1.
Image:2009-02-12_115519.png

Uncompress the downloaded file. Excutables of ant is under /bin directory

Image:2009-02-12 120126.png

Environment setup

On windows, you need to register enviroment variables before running ant.
Click "Environment Variables" from SystemProperties -> Advanced

Image:2009-02-12_120309.png

To register new environment variable, Click "New"

Image:2009-02-12_120507.png

For Variable Name, specify ANT_HOME, and for Variable Value, specify the path where ant installation file has been uncompressed and click "OK"

Image:2009-02-12_120612.png

Now to run ant regardless of your path, edit 'Path'

Image:2009-02-12_120406.png

For Variable Value field, add ';%ANT_HOME%\bin' at the end.

Image:2009-02-12_120729.png

Open up a command prompt and type ant and press enter. Now you can see you can run ant regardless of your current path.

Image:2009-02-12_120930.png

OpenZet Build

File composition

Download the lastes OpenZet source.

Image:2009-02-12_134605.png

If you uncompress the file, you can see ant build files and OpenZet manifest file.

Image:2009-02-12_134706.png

Build environment setup

build.properties
Environment setup for ant

build.xml
Build information xml for ant

openzet-manifest.xml
OpenZet component manifest file

Note that you should always adjust 'build.properties' file for you PC environemt to build OpenZet swc and resulting ASDoc files.
'build.properties' file has the following contents.

# Basic environment
flexsdk.dir = C:/Flex3SDK/flex_sdk_3.2.0.3794
source.dir = C:/openzet/src
# Project
project = OpenSource OpenZet Project
# Title
ASDoc.title = OpenZet
 
# Name of SWC to generate
swc.file = Samples.swc
 
# Flex SDK path
 
flexsdk.bin.dir = ${flexsdk.dir}/bin
flexsdk.lib.dir = ${flexsdk.dir}/frameworks/libs
 
# Locale
flexsdk.locale = en_US
flexsdk.locale.dir = ${flexsdk.dir}/frameworks/locale/{locale}
 
# compc path
compc.exe = ${flexsdk.bin.dir}/compc.exe
# asdoc path
asdoc.exe = ${flexsdk.bin.dir}/asdoc.exe
 
# Directory information
export.dir = ${source.dir}/export
output.swc = ${export.dir}/swc/${swc.file}
output.asdoc = ${export.dir}/asdoc
example.path.dir = ${source.dir}
 
# Environment setup
manifest.xml = ${basedir}/openzet-manifest.xml
include-namespaces = http://www.openzet.org/2009/mxml
namespaces.namespace = ${include-namespaces} ${manifest.xml}


Remember that you should adjust FlexSDK and OpenZet's source path according to your actual paths.

flexsdk.dir	= C:/Flex3SDK/flex_sdk_3.2.0.3794
source.dir	= C:/openzet/src

SWC, ASDoc generation

Run ant in the same path where OpenZet source file has been uncompressed. Then ant will automatically find 'build.xml' file and start building.
'build.xml' defines the following 3 tasks.

Image:2009-02-12_135223.png

To run the tasks defined in 'build.xml', you should type 'ant [taskname]'
For example, to create swc and ASDoc provided by OpenZet srouce, you should type 'ant release'.
Then ant will start to generate resulting files.
Image:2009-02-12_135659.png

Personal tools
Participation
Silverlight