@@ -25,21 +25,21 @@ def autolocate
25
25
end
26
26
27
27
def autolocate_osx
28
- osx_root = "/Applications/Arduino.app"
28
+ osx_root = "/Applications/Arduino.app/Contents "
29
29
old_way = false
30
30
return nil unless File . exist? osx_root
31
31
32
32
ret = ArduinoCmdOSX . new
33
- osx_place = "#{ osx_root } /Contents/ MacOS"
33
+ osx_place = "#{ osx_root } /MacOS"
34
34
35
35
if old_way
36
36
ret . base_cmd = [ File . join ( osx_place , "Arduino" ) ]
37
37
else
38
38
jvm_runtime = `/usr/libexec/java_home`
39
39
ret . base_cmd = [
40
40
"java" ,
41
- "-cp" , "#{ osx_root } /Contents/ Java/*" ,
42
- "-DAPP_DIR=#{ osx_root } /Contents/ Java" ,
41
+ "-cp" , "#{ osx_root } /Java/*" ,
42
+ "-DAPP_DIR=#{ osx_root } /Java" ,
43
43
"-Djava.ext.dirs=$JVM_RUNTIME/Contents/Home/lib/ext/:#{ jvm_runtime } /Contents/Home/jre/lib/ext/" ,
44
44
"-Dfile.encoding=UTF-8" ,
45
45
"-Dapple.awt.UIElement=true" ,
@@ -48,6 +48,8 @@ def autolocate_osx
48
48
"processing.app.Base" ,
49
49
]
50
50
end
51
+
52
+ ret . gcc_cmd = [ File . join ( osx_root , "Java" , "hardware" , "tools" , "avr" , "bin" , "avr-gcc" ) ]
51
53
ret
52
54
end
53
55
@@ -58,13 +60,15 @@ def autolocate_linux
58
60
unless cli_place . nil?
59
61
ret = ArduinoCmdLinuxBuilder . new
60
62
ret . base_cmd = [ cli_place ]
63
+ ret . gcc_cmd = Host . which ( "avr-gcc" )
61
64
return ret
62
65
end
63
66
64
67
forced_builder = File . join ( force_install_location , builder_name )
65
68
if File . exist? ( forced_builder )
66
69
ret = ArduinoCmdLinuxBuilder . new
67
70
ret . base_cmd = [ forced_builder ]
71
+ ret . gcc_cmd = [ File . join ( force_install_location , "hardware" , "tools" , "avr" , "bin" , "avr-gcc" ) ]
68
72
return ret
69
73
end
70
74
end
@@ -74,13 +78,15 @@ def autolocate_linux
74
78
unless gui_place . nil?
75
79
ret = ArduinoCmdLinux . new
76
80
ret . base_cmd = [ gui_place ]
81
+ ret . gcc_cmd = Host . which ( "avr-gcc" )
77
82
return ret
78
83
end
79
84
80
85
forced_arduino = File . join ( force_install_location , gui_name )
81
86
if File . exist? ( forced_arduino )
82
87
ret = ArduinoCmdLinux . new
83
88
ret . base_cmd = [ forced_arduino ]
89
+ ret . gcc_cmd = [ File . join ( force_install_location , "hardware" , "tools" , "avr" , "bin" , "avr-gcc" ) ]
84
90
return ret
85
91
end
86
92
nil
0 commit comments