How to run Processing applications from the terminal

笑着哭i 提交于 2019-12-06 06:46:54

问题


I'm currently using Processing for a small project, however I'm not liking the text-editor that comes with it. I use vim to write all of my code. I've found where the .pde file are and I've been editing them from vim and then I'm reopening them and running them (it takes a lot to reload the script and running it). That's why I want a solution where I can compile everything from the terminal.

On close inspection I've found the processing-java file that supposedly compiles and runs a sketch. However whatever arguments I supply it, it keeps on spitting the help page. This is an example on how I'm running them.

(PS: I made a script that runs processing-java and added it to /usr/bin)

processing-java --sketch=/home/george/sketchbook/testproject --output=/tmp/processing/test --force --run

Can anyone help me please run my sketchs from the terminal?


回答1:


I managed to do it by creating a bash script called pjava and the code is as follow if anyone is having this question:

#!/bin/bash
rm -rf /tmp/processing
mkdir /tmp/processing
/home/euler/Desktop/processing-2.0b8/processing-java --output=/tmp/processing/ --force --sketch=$1 --run

And the way I run it is as follow:

If I am inside a folder called project, I run pjava ../project and project.pde will get compiled and run.



来源:https://stackoverflow.com/questions/14787093/how-to-run-processing-applications-from-the-terminal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!