As2Api and RubyScript2Exe (darwinized)
Tue, 2006 Sep 05, 5:55pm
I recently sat down and took a look at as2api, which seems to be the most recommended JavaDoc exporter for actionscript. Once I had everything figured out, it seems to work fine, and I’m sure there are some little nuggets that I haven’t quite figured out yet, which I’m looking forward to figuring out. (read more for the skinny and darwin downloads)
However, for those of you out there in Mac OSX land, I wouldn’t recommend downloading the current version listed on the site for OSX, entitled “as2api-allinone-osx-0.4.sit” in the downloads section. I think that it is missing files, or that it just doesn’t work correctly at all. I would recommend instead downloading the first link for “as2api-0.4.tar”. The downside of downloading this version is that there is no OSX command line executable in there, so you have to run the Ruby script “ruby as2api.rb packages –classpath classpath” which works just fine.
Honestly, I don’t know enough about ANT scripts yet to know if you can run Ruby scripts from an ANT script target, so I used rubyscript2exe, another handy little application to convert the Ruby scripts into a mac command line executable. (Incidentally, and to add a little geek comedy to this post, you have to install the Pascal compiler and compile a piece of the rubyscript2exe library in order to run it…so I had to compile one application in order to create another one…).
Anyway, I have included below 2 downloadables in this post. The first is the command line version of as2api that is compiled from the package that you can download as Ruby code from the as2api site. The down side is that you cannot tweek the css and html templates that are part of that code; the up side is that you can actually use it as a command line executable, which is entitled “as2api_darwin”. You can used it exactly as you would the as2api.rb Ruby script.
PlasticWare Downloadable ::
Darwin Executable of As2Api (JavaDoc for Actionscript) (Sep. 5, 2006)
Download (~4.5mB) :: as2api-0.4.zip
The second downloadable I have included here is the rubyscript2exe download, altered to include the eee_darwin file that I compiled from the pascal source on my mactel laptop in OSX 10.4.7, and repackaged using tar2rubyscript.rb, which was also necessary to get it running properly. I have also included the example hello world script “hello.rb” from the tutorial, which you can use to test the code and make a hello world exe.
PlasticWare Downloadable ::
RubyScript2Exe with eee_darwin for OSX environment (Sep. 5, 2006)
Download (~1.1mB) :: rubyscript2exe.zip.gz
Both of these pieces of software are released by their proper creators under the GNU License, and I have included the source and license for each as well, as posted on their sites. Please download judiciously, the executable for as2api package is 4.5 mb.
Entry Filed under: actionscript, coding, downloadable, osx, ruby, technology, terminal




7 Comments Add your own
1. erixtekila | January 19th, 2007 at 10:52 am
It’s strange, but I can’t open the as2api zip file.
Any clue ?
2. ryan | February 28th, 2007 at 11:42 pm
file has been updated, and should now decompress correctly. for some reason, the file was even showing up as 0kB on the server…
3. nokati | November 7th, 2007 at 8:12 pm
Sadly it seems this no longer works in OS X 10.5 Leopard (at least in Ant) dying with errors: “dyld: Symbol not found: _lchmod …”
4. nokati | November 15th, 2007 at 10:02 am
Any chance you can do a new compile for Leopard? as I mentioned previously it dies on ant, and via command line we get a nice Segmentation Fault.
My open source project relies on using as2api and ant as part of project automation to generate docs - wed all be so greatful if youd provide a new ruby2exe build!
5. ryan | November 15th, 2007 at 11:04 am
Apologies, but I don’t have Leopard yet, so the chances of me doing that very soon aren’t that great. You should be able to compile the latest rubyscript2exe on Leopard and create the newer version of that for your mac. Then create the new script version of as2api using rubyscript2exe (for which there is a link in the article above). I guess I am a late adopter when it comes to Leopard.
6. nokati | November 15th, 2007 at 1:14 pm
Yeah I gave this a try (keeping in mind im almost completely in the dark when it comes to ruby) but I think Im missing something:
Unpacked your rubyscript2exe and as2api (0.4 from badgerfoil) into the same dir and run:
./eee_darwin as2api.rb as2api_leopardwhich throws the error:
as2api_leopard: Couldn't change directory: "/Users/jason/Downloads/rubyscript2exe/quire 'ui/cli'"Any thoughts?
7. nokati | November 15th, 2007 at 1:48 pm
Sorry - I hit the docs and read a bit closer so the above post is flawed - however trying what should work I think either ruby2exe or eee_darwin may be the trouble on leopard:
$ ruby rubyscript2exe.rb rubyscript2exe.rb as2api_leopard
Tracing rubyscript2exe ...
Gathering files...
Copying files...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ftools.rb:68: command not found: otool -L /tmp/ev.dependencies.7849.tmp
/tmp/tar2rubyscript.d.7849.1/rubyscript2exe/ev/dependencies.rb:73:in `ldds': undefined method `collect' for nil:NilClass (NoMethodError)
from /tmp/tar2rubyscript.d.7849.1/rubyscript2exe/ev/dependencies.rb:68:in `each'
from /tmp/tar2rubyscript.d.7849.1/rubyscript2exe/ev/dependencies.rb:68:in `ldds'
from /private/tmp/tar2rubyscript.d.7849.1/rubyscript2exe/init.rb:164
from rubyscript2exe.rb:608:in `load'
from rubyscript2exe.rb:608
from rubyscript2exe.rb:559:in `newlocation'
from rubyscript2exe.rb:487:in `newlocation'
from rubyscript2exe.rb:454:in `newlocation'
from rubyscript2exe.rb:487:in `newlocation'
from rubyscript2exe.rb:559:in `newlocation'
from rubyscript2exe.rb:603
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed