ASDoc on Mac?

Has anyone gotten ASDoc in Flex 2 to work on a Mac? I’m writing some API’s at work so have the dubious honor of writing documentation. However, the Ant tasks don’t support asdoc, nor do simple Ant exec tasks work. Something about some Java class not finding “Flex”.

I reckon I could generate the docs on my PC at home, but that’s a cop-out. Plan B might be to go give NaturalDocs another run. According to the site, my Mac already has a Perl runtime, so a decent option. While I’m not a fan of deviating from the Java docs format, the docs it outputs are important, not the format.

10 Replies to “ASDoc on Mac?”

  1. I haven’t done a huge amount of research but found it works if you run it directly from the bin directory.

    Note that for OSX/Unix asdoc is actually a shell script. Chances are it’s a classpath / jvm issue that could be sorted with a change to the script, but I haven’t tried that yet.

  2. .. some more investigation shows that this happens when you have spaces in the path to the Flex Builder 2 directory.

    I created a symlink from the FB2 directory into my home directory and it works fine:

    Wagyu:~ marcin$ ln -s ‘/Applications/Adobe Flex Builder 2 Plug-in/Flex SDK 2’ fb2
    Wagyu:~ marcin$ ~/fb2/bin/asdoc
    Loading configuration file [… etc]

  3. Let’s see if this even comes through. The below works for me using Ant on the Mac. This assumes you have the latest Flex 2 SDK in the spot referenced below. Adjust the arguments to asdoc accordingly, and add this target to your main target’s depend list:

    <property name="flexSDK" value="/Developer/SDKs/Flex" />
    <property name="asdoc" value="${flexSDK}/bin/asdoc" />
    <target name="doc">
    <exec executable="${asdoc}">
    <arg line = "-source-path ${src.dir} -doc-classes ApplicationClass -window-title ‘Documentation’ -output ${dist.dir}/docs" />
    </exec>
    </target>

  4. I just don’t know how to use Terminal commands. If I go ‘./asdoc’ instead of ‘asdoc’, it works great! Thanks to John Robinson.

  5. Hi Jesse,

    I’ve been able to succesfully use adoc on the mac for a while now. Perhaps I can be of some help, how are you trying to use asdoc exactly?

    cheers,
    Sam

  6. Thanks Sauel! If you see from the comments, I eventually figured it out; it apparently was just my Terminal format. I’m new to the Mac, as well as new to Terminal commands so I just emailed a friend of mine who uses Mac and we figured it out.

Comments are closed.