I have made the first steps toward returning ruby-processing to
rubygems distribution. See my fork
on github. This is work in progress, however it does work on Archlinux, and also should also work on the MAC, where the path to the processing jars should be stable?
- Install processing-2.1.0 (for your OS)
- Create or edit the YAML .rp5rc file to point to processing-root possibly using the sketch below (in the processing ide) config.pde
- Clone my fork
- cd ruby-processing (or whatever you call it)
- rake (MAC and linux) to see if tests work
- gem install ruby-processing-{version}.gem for more comprehensive testing
Currently for ease of testing we still include jruby-complete download as option, but it is not required for many sketches, intention is it will be available as a post install option.
String processingRoot = "enter your processing root here";
String home;
PFont font;
void setup() {
size(400, 200);
font = createFont("Helvetica", 18);
home = System.getProperty("user.home");
}
void draw() {
background(255);
fill(255, 0, 0);
textFont(font, 18);
text(processingRoot+(frameCount/10 % 2 == 0 ? "_" : ""), 35, 45);
}
void keyReleased() {
if (key != CODED) {
switch(key) {
case BACKSPACE:
processingRoot = processingRoot.substring(0, max(0, processingRoot.length()-1));
break;
case ENTER:
case RETURN:
PrintWriter pw = createWriter(home + "/.rp5rc");
pw.write("PROCESSING_ROOT: \"" + processingRoot + "\"");
pw.close();
break;
case ESC:
case DELETE:
break;
default:
processingRoot += key;
}
}
}
No comments:
Post a Comment