File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ public Base(String[] args) throws Exception {
324324 boolean doVerbose = false ;
325325 String selectBoard = null ;
326326 String selectPort = null ;
327+ String currentDirectory = System .getProperty ("user.dir" );
327328 // Check if any files were passed in on the command line
328329 for (int i = 0 ; i < args .length ; i ++) {
329330 if (args [i ].equals ("--upload" )) {
@@ -350,6 +351,12 @@ public Base(String[] args) throws Exception {
350351 selectPort = args [i ];
351352 continue ;
352353 }
354+ if (args [i ].equals ("--curdir" )) {
355+ i ++;
356+ if (i < args .length )
357+ currentDirectory = args [i ];
358+ continue ;
359+ }
353360 String path = args [i ];
354361 // Fix a problem with systems that use a non-ASCII languages. Paths are
355362 // being passed in with 8.3 syntax, which makes the sketch loader code
@@ -363,6 +370,9 @@ public Base(String[] args) throws Exception {
363370 e .printStackTrace ();
364371 }
365372 }
373+ if (!new File (path ).exists ()) {
374+ path = new File (currentDirectory , path ).getAbsolutePath ();
375+ }
366376 if (handleOpen (path ) != null ) {
367377 opened = true ;
368378 }
Original file line number Diff line number Diff line change 11#! /bin/sh
2-
2+
3+ CURDIR=` pwd`
34APPDIR=" $( dirname -- " $( readlink -f -- " ${0} " ) " ) "
45
56cd " $APPDIR "
6-
7+
78for LIB in \
89 java/lib/rt.jar \
910 java/lib/tools.jar \
@@ -19,4 +20,5 @@ export LD_LIBRARY_PATH
1920
2021export PATH=" ${APPDIR} /java/bin:${PATH} "
2122
22- java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base " $@ "
23+ java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base --curdir $CURDIR " $@ "
24+
You can’t perform that action at this time.
0 commit comments