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.

Comments

10 responses to “ASDoc on Mac?”

  1. Marcin Avatar

    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. Marcin Avatar

    .. 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. Chad Avatar

    Jesse, have you found an answer for this yet? I would be interested in learning more about what you find…

  4. JesterXL Avatar

    …well, works wonders on Windows. Bleh, guess I’ll just use Windows to compile the docs till someone else figures it out.

  5. enefekt Avatar

    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>

  6. enefekt Avatar

    Don’t know why I even thought that would work. I just put the example up in a text file here:
    http://enefekt.com/ant_asdoc_example.txt

  7. JesterXL Avatar

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

  8. Samuel Agesilas Avatar

    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

  9. Sauel Agesilas Avatar

    Hi Jesse,

    I’ve add a tutorial on tamin asdoc on os x. You can find it on my blog here…

    http://www.levelofindustry.com/journal/2007/5/2/taming-asdoc-in-flex-builder-on-os-x.html

    Hope it helps… peace,
    Sam

  10. JesterXL Avatar

    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.