Running Adobe AsDoc on my Mac using ANT!

Wow, this was really challenging! But now, finally, I found out how to use AsDoc on my Mac.There must be another solution out there, but I simply want to document this workaround hoping that this also works on your Mac.

What you need is a Flex SDK 2.0.1 which comes with Flex Builder or as a free download from Adobe and the knowledge how to use ANT (I use eclipse).

I tried this tutorial several times but it never worked for me. I don’t know why.But after hours of testing I Â hopefully found a proper solution which works find with Flex SDK 2.0.1. The main idea simply is separating the AsDoc functionality from the normal Flex Builder environment. Basically the only thing you have to do is avoiding whitespaces from your directory names. However I tried to use Flex Builder for this and Flex Builder installs into the directory “Flex Builder 3”.So this is what I did and you might try:

  • Create a new directory within the applications folder (don’t use whitespace!) “Applications/Adobe_AsDoc”
  • Copy the Flex SDK 2.0.1 into that “Adobe_AsDoc” directory
  • Rename the Flex SDK directory to “FlexSDK_201” (which might not be necessary, but I tried to avoid any special characters within the directory names)

Great. So all you have to do now is download and use this ANT build.xml (download):

<?xml version="1.0" encoding="UTF-8"?>
<project name="Documentation" default="asdoc">
 
	<property environment="env"/>
 
	<!--
			Markus Raab - derRaab.com / superclass.de
 
			This ANT build.xml works on a Mac with a FLEX SDK 2.0.1 in the following location:
			/Applications/Adobe_AsDoc/FlexSDK_201
 
			For more informations see: blog.derraab.com
 
			ATTENTION: Use relative paths (according to this build.xml)
	-->
 
 
	<!--
	ActionScript directory location in source-path and doc-sources (both are needed?)
	-->
	<property name="source-path" value="../src/as/"/>
	<property name="doc-sources" value="../src/as/"/>
 
	<!--
	List with all your used library SWC files (using a directory causes asdoc not to write any documentation files?)
	-->
	<property name="library-path" value="../src/as/mdm.swc ../src/as/layout.swc"/>
 
	<!--
	Documentation output directory
	-->
	<property name="output" value="./classes"/>
 
	<!--
	SDK Location (without whitespace!)
	-->
	<property name="flex-sdk" value='/Applications/Adobe_AsDoc/FlexSDK_201'/>
 
	<!--
	Location of the asdoc templates
	-->
	<property name="templates-path" value='${flex-sdk}/asdoc/templates'/>
 
 
	<!--
	run
	-->
	<target name="asdoc">
 
		<exec executable='${flex-sdk}/bin/asdoc'>
 
			<arg value='-source-path ${source-path}'/>
			<arg value='-doc-sources ${doc-sources}'/>
			<arg value='-library-path ${library-path}'/>
			<arg value='-output ${output}'/>
			<arg value='-templates-path ${templates-path}'/>
 
		</exec>
 
	</target>
 
</project>

2 thoughts on “Running Adobe AsDoc on my Mac using ANT!”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.