File tree 1 file changed +21
-3
lines changed 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 38
38
function arduino_binary = find_arduino_binary ()
39
39
40
40
# use arduino_debug .exe in windoze ?
41
- binary_name = " arduino" ;
41
+ binary_name = { " arduino" , " arduino-ide " } ;
42
42
arduino_binary = " " ;
43
43
have_prefs = false ;
44
44
52
52
endif
53
53
54
54
if (isunix ())
55
- binaries = strcat (binary_name , {" " , " .exe" });
55
+ binaries = {}'
56
+ for idx= 1 : numel(binary_name )
57
+ binaries{end + 1 } = binary_name{idx };
58
+ binaries{end + 1 } = strcat (binary_name{idx }, " .exe" );
59
+ endfor
56
60
else
57
- binaries = strcat (binary_name , {" .exe" });
61
+ binaries = {}'
62
+ for idx= 1 : numel(binary_name )
63
+ binaries{end + 1 } = strcat (binary_name{idx }, " .exe" );
64
+ endfor
58
65
endif
59
66
67
+ # do we have a ARDUINO_HOME ?
68
+ if isempty (arduino_binary )
69
+ if isenv(" ARDUINO_HOME" )
70
+ n= 0 ;
71
+ while (n < numel (binaries ) && isempty (arduino_binary ))
72
+ arduino_binary = file_in_path (getenv (" ARDUINO_HOME" ), binaries{++n });
73
+ endwhile
74
+ endif
75
+ endif
76
+
77
+ # can we find in path
60
78
n = 0 ;
61
79
while (n < numel (binaries ) && isempty (arduino_binary ))
62
80
arduino_binary = file_in_path (getenv (" PATH" ), binaries{++n });
You can’t perform that action at this time.
0 commit comments