@@ -172,41 +172,55 @@ private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, Targ
172
172
File executable = BaseNoGui .getContentFile ("arduino-builder" );
173
173
CommandLine commandLine = new CommandLine (executable );
174
174
commandLine .addArgument (action .value , false );
175
- commandLine .addArgument ("-logger=machine" , false );
175
+ commandLine .addArgument ("-logger" , false );
176
+ commandLine .addArgument ("machine" , false );
176
177
177
178
Stream .of (BaseNoGui .getHardwarePath (), new File (BaseNoGui .getSettingsFolder (), "packages" ).getAbsolutePath (), BaseNoGui .getSketchbookHardwareFolder ().getAbsolutePath ())
178
179
.forEach (p -> {
179
180
if (Files .exists (Paths .get (p ))) {
180
- commandLine .addArgument ("-hardware=\" " + p + "\" " , false );
181
+ commandLine .addArgument ("-hardware" , false );
182
+ commandLine .addArgument ("\" " + p + "\" " , false );
181
183
}
182
184
});
183
185
184
186
Stream .of (BaseNoGui .getContentFile ("tools-builder" ).getAbsolutePath (), Paths .get (BaseNoGui .getHardwarePath (), "tools" , "avr" ).toAbsolutePath ().toString (), new File (BaseNoGui .getSettingsFolder (), "packages" ).getAbsolutePath ())
185
187
.forEach (p -> {
186
188
if (Files .exists (Paths .get (p ))) {
187
- commandLine .addArgument ("-tools=\" " + p + "\" " , false );
189
+ commandLine .addArgument ("-tools" , false );
190
+ commandLine .addArgument ("\" " + p + "\" " , false );
188
191
}
189
192
});
190
193
191
- commandLine .addArgument ("-libraries=\" " + BaseNoGui .getSketchbookLibrariesFolder ().getAbsolutePath () + "\" " , false );
192
- commandLine .addArgument ("-libraries=\" " + BaseNoGui .getContentFile ("libraries" ).getAbsolutePath () + "\" " , false );
194
+ commandLine .addArgument ("-libraries" , false );
195
+ commandLine .addArgument ("\" " + BaseNoGui .getSketchbookLibrariesFolder ().getAbsolutePath () + "\" " , false );
196
+ commandLine .addArgument ("-libraries" , false );
197
+ commandLine .addArgument ("\" " + BaseNoGui .getContentFile ("libraries" ).getAbsolutePath () + "\" " , false );
193
198
194
199
String fqbn = Stream .of (aPackage .getId (), platform .getId (), board .getId (), boardOptions (board )).filter (s -> !s .isEmpty ()).collect (Collectors .joining (":" ));
195
- commandLine .addArgument ("-fqbn=" + fqbn , false );
200
+ commandLine .addArgument ("-fqbn" , false );
201
+ commandLine .addArgument (fqbn , false );
196
202
197
- commandLine .addArgument ("-ide-version=" + BaseNoGui .REVISION , false );
198
- commandLine .addArgument ("-build-path=\" " + buildPath + "\" " , false );
199
- commandLine .addArgument ("-warnings=" + PreferencesData .get ("compiler.warning_level" ), false );
203
+ commandLine .addArgument ("-ide-version" , false );
204
+ commandLine .addArgument (Integer .toString (BaseNoGui .REVISION ), false );
205
+ commandLine .addArgument ("-build-path" , false );
206
+ commandLine .addArgument ("\" " + buildPath + "\" " , false );
207
+ commandLine .addArgument ("-warnings" , false );
208
+ commandLine .addArgument (PreferencesData .get ("compiler.warning_level" ), false );
200
209
201
210
PreferencesData .getMap ()
202
211
.subTree ("build_properties_custom" )
203
212
.entrySet ()
204
213
.stream ()
205
- .forEach (kv -> commandLine .addArgument ("-prefs=\" " + kv .getKey () + "=" + kv .getValue () + "\" " , false ));
214
+ .forEach (kv -> {
215
+ commandLine .addArgument ("-prefs" , false );
216
+ commandLine .addArgument ("\" " + kv .getKey () + "=" + kv .getValue () + "\" " , false );
217
+ });
206
218
207
- commandLine .addArgument ("-prefs=build.warn_data_percentage=" + PreferencesData .get ("build.warn_data_percentage" ));
219
+ commandLine .addArgument ("-prefs" , false );
220
+ commandLine .addArgument ("build.warn_data_percentage=" + PreferencesData .get ("build.warn_data_percentage" ), false );
208
221
209
- //commandLine.addArgument("-debug-level=10", false);
222
+ //commandLine.addArgument("-debug-level", false);
223
+ //commandLine.addArgument("10", false);
210
224
211
225
if (verbose ) {
212
226
commandLine .addArgument ("-verbose" , false );
0 commit comments