Bug 1549 : processing sh script can't launch sketches directly.
Last modified: 2010-05-06 10:51




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
coldnebo
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-04-16 10:45
added the following changes to make this work:

25:#filename
26:SKETCH=`pwd`/$1

103:java processing.app.Base $SKETCH &
Additional Comment #1 From fry 2010-04-17 08:33
hm, any thoughts on how we'd handle that if a path had been added already?
this wouldn't work in these cases:

./processing /some/path/to/asketch.pde

or

./processing ~/another/path/to/asketch.pde
Additional Comment #2 From coldnebo 2010-04-18 13:02
Ah, change it to:

26:SKETCH=`readlink -f $1`

does that help?
Additional Comment #3 From fry 2010-04-28 14:17
sure, that looks good. added for the next release. thanks!
Additional Comment #4 From coldnebo 2010-05-06 09:55
Opps, found that this causes an error if you try to start processing
without a file from the command line. Made the following changes (as
compared to the current release):

$ diff processing-1.1/processing /local/processing-1.1/processing
24a25,27
> #filename
> SKETCH=`pwd`/$1
>
100c103,108
< java processing.app.Base &
---
> if [ "$1" ]; then
> java processing.app.Base $SKETCH &
> else
> java processing.app.Base &
> fi
>
Additional Comment #5 From coldnebo 2010-05-06 10:00
Sorry, I messed that up. I forgot to add the readlink change from my home
machine. Here's the real patch:

$ diff processing-1.1/processing /local/processing-1.1/processing
24a25,31
> #filename
> if [ "$1" ]; then
> SKETCH=`readlink -f $1`
> else
> SKETCH=""
> fi
>
100c107
< java processing.app.Base &
---
> java processing.app.Base $SKETCH &
Additional Comment #6 From fry 2010-05-06 10:51
got it, thanks. i've added that to the svn. i'm actually using "$SKETCH"
for safety, but hopefully that won't cause problems when SKETCH is empty.