What's new? | Help | Directory | Sign in
Google
flexlib
Open Source Flex Component Library
  
  
  
  
    
Search
for
Updated Feb 28, 2007 by darron.schall
Labels: build, ant, test, asdoc, run, compile, mxmlc, compc, doc, asdoc, compile, run, examples
HowToBuild  
Information about building the examples, running the unit tests, creating asdoc documentation, etc.

Introduction

An ANT build script is provided to make building and interacting with the FlexLib project easier.

TODO Explain the "test", "lib" and "examples" build targets, as well as "zip" for creating a distribution. Explain how to edit the manifest.xml file for creating the .swc in the "lib" target.

Generating Documentation

To generate updated ASDoc documentation, run the doc build target. This will document all of the classes under the src tree.

Important: The ASDoc documentation is stored in the SVN repository. In order to be able to view the documentation in a web browser, the proper mime-types must be set for the files. There are two ways to do this.

  1. Change your Subversion config file to enable auto-props, or,
  2. Run the fixDocMimeTypes build target

I recommend the first method. Here are the details of each:

Enabling Subversion Auto-Props

Open your Subversion config file in a text editor. The file locations are as follows:

Add the following text at the very end of the file:

[miscellany]
enable-auto-props = yes

[auto-props]
# Scriptish formats
*.bat        = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
*.bsh        = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-beanshell
*.cgi        = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
*.cmd        = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
*.js         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/javascript
*.php        = svn:eol-style=native; svn:keywords=Id Rev Date; svn:mime-type=text/x-php
*.pl         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl; svn:executable
*.pm         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl
*.py         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-python; svn:executable
*.sh         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-sh; svn:executable

# Image formats
*.bmp        = svn:mime-type=image/bmp
*.gif        = svn:mime-type=image/gif
*.ico        = svn:mime-type=image/ico
*.jpeg       = svn:mime-type=image/jpeg
*.jpg        = svn:mime-type=image/jpeg
*.png        = svn:mime-type=image/png
*.tif        = svn:mime-type=image/tiff
*.tiff       = svn:mime-type=image/tiff

# Data formats
*.pdf        = svn:mime-type=application/pdf
*.avi        = svn:mime-type=video/avi
*.doc        = svn:mime-type=application/msword
*.eps        = svn:mime-type=application/postscript
*.gz         = svn:mime-type=application/gzip
*.mov        = svn:mime-type=video/quicktime
*.mp3        = svn:mime-type=audio/mpeg
*.ppt        = svn:mime-type=application/vnd.ms-powerpoint
*.ps         = svn:mime-type=application/postscript
*.psd        = svn:mime-type=application/photoshop
*.rtf        = svn:mime-type=text/rtf
*.swf        = svn:mime-type=application/x-shockwave-flash
*.tgz        = svn:mime-type=application/gzip
*.wav        = svn:mime-type=audio/wav
*.xls        = svn:mime-type=application/vnd.ms-excel
*.zip        = svn:mime-type=application/zip

# Text formats
.htaccess    = svn:mime-type=text/plain
*.css        = svn:mime-type=text/css
*.dtd        = svn:mime-type=text/xml
*.html       = svn:mime-type=text/html
*.ini        = svn:mime-type=text/plain
*.sql        = svn:mime-type=text/x-sql
*.txt        = svn:mime-type=text/plain
*.xhtml      = svn:mime-type=text/xhtml+xml
*.xml        = svn:mime-type=text/xml
*.xsd        = svn:mime-type=text/xml
*.xsl        = svn:mime-type=text/xml
*.xslt       = svn:mime-type=text/xml
*.xul        = svn:mime-type=text/xul
*.yml        = svn:mime-type=text/plain
CHANGES      = svn:mime-type=text/plain
COPYING      = svn:mime-type=text/plain
INSTALL      = svn:mime-type=text/plain
Makefile*    = svn:mime-type=text/plain
README       = svn:mime-type=text/plain
TODO         = svn:mime-type=text/plain

# Code formats
*.c          = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.cpp        = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.h          = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.java       = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.as         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.mxml       = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain

Now, any time you commit to a Subversion repository, the mime-types will automatically be set for certain file types. This allows you to view the documentation correctly in a web browser.

Fixing the mime-type with ANT

After you generate the documentation, do an SVN commit so that the files are added to the repostiry. Run the fixDocMimeTypes build target. This will loop over all of the documentation files and set the correct mime-types. When the build completes, do another SVN commit to push the mime-type changes to the repository.


Comment by silpa004...@rediffmail.com, Jul 12, 2007

<script type="text/javascript"><!-- google_ad_client = "pub-8126351396115085"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; //2007-07-12: http://freewebs.com/silpa4u google_ad_channel = "4144148975"; google_ui_features = "rc:0"; //--> </script> <script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Comment by tobiaspatton, Aug 28, 2007

To build asdoc pages, build the "docs" target. The instructions say to build the "doc' target.

Comment by dmozzherin, Aug 30, 2007

Mac OS X:

The location of the Subversion config is the same as for Linux:

~/.subversion/config

Comment by christianhessgruenig, Nov 26, 2007

The location of the config file on Windows systems is: "%APPDATA%\Subversion\config"

On this way you can easily edit this file by invoking notepad "%APPDATA%\Subversion\config" on the commandline.

christianhessgruenig

Comment by gmkarl, Mar 16, 2008

To build for flex 3 there is a directive that must be uncommented in build.xml around line 119. (<arg line="-el '${flexsdk.lib.dir}/player'" />)

To build for the open source SDK the charting component must be removed from manifest.xml.

Comment by farhan.sarwar, Mar 26, 2008

I wonder why isnt the svn:eol-style set to "native" for text format...

Comment by Will.S.Graham, May 22, 2008

http://code.google.com/p/flexlib/wiki/HowToContribute: "It's not too hard, and if you're not already familiar with using SVN and Ant within Eclipse then now is a great chance to learn."

TODO: how to use ANT in Eclipse to build the source

Comment by htin.nyo, Jul 03, 2008

Hello, I have been playing around with flexlib. Now, I would like to add my custom classes and build it into original flexlib. Now, I am trying to build flexlib (from command line) using ant script provided. However, I got tons of error messages saying "flash.xxx.xxx." is undefined. what does it means? I have flex 3 libraries and defined correctly in ant build script So do I need to have flash IDE installed or some kind of flash sdk other than flex 3 library? Thanks

Comment by htin.nyo, Jul 03, 2008

nevermind i got it working using ant build script. since I am using flex3, I just need to include flash player sdk path (frameworks\libs\player\9\playerglobal.swc) in compiler options


Sign in to add a comment