@@ -109,33 +109,31 @@ def main():
109
109
args = parse_args ()
110
110
111
111
ide_path = args .ide_path
112
- try :
113
- print ("IDE dir1: " , ide_path )
114
- except :
115
- pass
116
112
if not ide_path :
117
113
ide_path = os .environ .get ('ARDUINO_IDE_PATH' )
118
114
if not ide_path :
119
115
print ("Please specify Arduino IDE path via --ide_path option"
120
116
"or ARDUINO_IDE_PATH environment variable." , file = sys .stderr )
121
117
return 2
122
118
123
- print ("IDE dir2: " , ide_path )
124
119
sketch_path = args .sketch_path
125
120
tmp_dir = args .build_path
126
121
created_tmp_dir = False
127
122
if not tmp_dir :
128
123
tmp_dir = tempfile .mkdtemp ()
129
124
created_tmp_dir = True
130
125
131
- tools_dir = os .path .dirname (os .path .realpath (__file__ )) + '/../tools'
132
- # this is not the correct hardware folder to add.
133
- hardware_dir = os .path .dirname (os .path .realpath (__file__ )) + '/../cores'
126
+ if platform .system () == "Windows" :
127
+ tools_dir = os .path .dirname (os .path .realpath (__file__ )) + '\\ ..\\ tools'
128
+ hardware_dir = os .path .dirname (os .path .realpath (__file__ )) + '\\ ..\\ cores'
129
+ else :
130
+ tools_dir = os .path .dirname (os .path .realpath (__file__ )) + '/../tools'
131
+ # this is not the correct hardware folder to add.
132
+ hardware_dir = os .path .dirname (os .path .realpath (__file__ )) + '/../cores'
134
133
135
134
output_name = tmp_dir + '/' + os .path .basename (sketch_path ) + '.bin'
136
135
137
136
if args .verbose :
138
- print ("IDE dir: " , ide_path )
139
137
print ("Sketch: " , sketch_path )
140
138
print ("Build dir: " , tmp_dir )
141
139
print ("Cache dir: " , args .build_cache )
0 commit comments