We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › A new Processing Ant script (OpenGL compatible)
Page Index Toggle Pages: 1
A new Processing Ant script (OpenGL compatible) (Read 2565 times)
A new Processing Ant script (OpenGL compatible)
Jul 4th, 2007, 2:37am
 
I decided to suck it up and learn how to use Ant over the past few days, and I ended up with what I feel is a pretty usable Ant script for building Processing applets outside of PDE.

Also handy is a little "skeleton" package I put together which includes the bare essentials required to get going with P5 and Ant. There aren't any installation instructions yet, but take a look at the build.xml and build.properties files for some documentation.

Here's a working OpenGL example:
http://pantheon.yale.edu/~gej5/SoC/p5-ant-proj/

The main setup steps required for this are:

1) Install a Java SDK.
2) Install Ant version 1.7 (the latest), and make sure the ant/bin directory is in your system path.
3) Unzip the skeleton project, navigate to the root folder in the command line, and type "ant".

Hope this proves somewhat useful,
 greg
Re: A new Processing Ant script (OpenGL compatible
Reply #1 - Jul 4th, 2007, 8:56am
 
Is there a way to use this from eclipse
Re: A new Processing Ant script (OpenGL compatible
Reply #2 - Jul 4th, 2007, 3:50pm
 
Sure there is -- in fact, that's exactly what I've been using it for lately.

Here's what to do:

1. Download the p5-ant-proj.zip file, and unzip to your desired location.
2. Go to Eclipse, and go File->New Project
3. in the Project dialog, first choose "Java Project"
4. in the next page, choose "create project from existing source," then Browse, then select the root folder of the p5-ant-proj directory (this is the folder that contains build.xml and build.properties).
5. You can either click "Finish" right here, or continue with "Next" to verify the settings... in any case, it seems like Eclipse does a pretty good job of guessing things.

Now your project should be all set up in Eclipse. To run a build using the Ant script, you do the following:
1. Double-click the "build.xml" file to open it in the Eclipse editor
2. You should see an "Outline" view of the build file on the right... right-click on the "dist" item, then choose "Run as"-->"Ant build"

If all goes well, this should create the "applet" directory with the compiled sketch. There are other ways to preview the applet from within Eclipse, but that's a bit more of a process... just try playing around with Eclipse's "Run" configurations, under the menu "Run"->"Run"...

Cheers,
 greg
Re: A new Processing Ant script (OpenGL compatible
Reply #3 - Sep 6th, 2007, 9:08am
 
How would you link external library? Avoiding to copy them in the lib folder?

Thanks, chr
Re: A new Processing Ant script (OpenGL compatible
Reply #4 - Sep 6th, 2007, 9:12am
 
If I double click on the .jar, it doesn't find the main class. How would you do for offline projects?

Thanks, chr
Re: A new Processing Ant script (OpenGL compatible
Reply #5 - Oct 6th, 2007, 12:07pm
 
hey, gjuggler. the link is broken, can you make this available again?

thanks!
Re: A new Processing Ant script (OpenGL compatible
Reply #6 - Oct 7th, 2007, 10:41pm
 
This is what the original link contained: http://phylowidget.googlecode.com/svn/trunk/PhyloWidget/

Re: A new Processing Ant script (OpenGL compatible
Reply #7 - Oct 8th, 2007, 12:01am
 
I've also set up a more politely packaged version of the barebones Ant template: http://www.andrewberman.org/projects/p5barebones/

greg
Re: A new Processing Ant script (OpenGL compatible
Reply #8 - Oct 8th, 2007, 10:27am
 
great, thanks!

I want to try to integrate this with jedit, as eclipse is a little bit too big for my tastes. I've no idea of ant, though, so let's see how far I can get

Thanks a lot.
Page Index Toggle Pages: 1