I managed to build & run android sketches from command line with ./processing-java. I had to change some lines to achieve that (~250-270 in Commander.java and Devices/AndroidBuild classes visibility).
Something like:
AndroidMode androidMode = (AndroidMode) ModeContribution.load(null, Base.getContentFile("modes/android"),
"processing.mode.android.AndroidMode").getMode();
androidMode.checkSDK(null);
try {
sketch = new Sketch(pdePath, androidMode);
if (task == BUILD || task == RUN || task == PRESENT) {
AndroidBuild build = new AndroidBuild(sketch, androidMode);
build.build("debug");
AndroidRunner runner = new AndroidRunner(build, this);
runner.launch(Devices.getInstance().getHardware());
However, how should command-line evolve for android?
as a standalone shell script ./processing-android and class AndroidCommander;
make ./processing-java more general: add --mode=[java/android/etc.], decouple Commander from Java mode?
Yeah, it's not a difficult change, so much as it just needs some babysitting.
I decided that the command line versions should live in the individual modes, since they behave somewhat differently and start diverging fairly quickly. So to answer your question, a separate Commander class over in processing.mode.android would be the right way to go.
Activity
pif commented on Mar 30, 2013
I managed to build & run android sketches from command line with ./processing-java. I had to change some lines to achieve that (~250-270 in Commander.java and Devices/AndroidBuild classes visibility).
Something like:
AndroidMode androidMode = (AndroidMode) ModeContribution.load(null, Base.getContentFile("modes/android"), "processing.mode.android.AndroidMode").getMode(); androidMode.checkSDK(null); try { sketch = new Sketch(pdePath, androidMode); if (task == BUILD || task == RUN || task == PRESENT) { AndroidBuild build = new AndroidBuild(sketch, androidMode); build.build("debug"); AndroidRunner runner = new AndroidRunner(build, this); runner.launch(Devices.getInstance().getHardware());However, how should command-line evolve for android?
benfry commented on Apr 11, 2013
Yeah, it's not a difficult change, so much as it just needs some babysitting.
I decided that the command line versions should live in the individual modes, since they behave somewhat differently and start diverging fairly quickly. So to answer your question, a separate Commander class over in processing.mode.android would be the right way to go.
fixed processing#1361: added android command-line support
fixed processing#1361 android command-line
fixed processing#1361 removed debug info
fixed processing#1361 updated sources
issue processing#1361: removed general cli files
processing-bugs commented on May 14, 2013
Available in the next release. Thanks again!
github-actions commented on Jun 17, 2021
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.