@@ -38,7 +38,7 @@ public class WorkAround extends Const {
38
38
// Each time this class is touched consider changing the String below to enforce
39
39
// updates
40
40
// for debugging I added the system time so the files get refresed at each run
41
- private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.01.test 11 " ;
41
+ private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.01.test 13 " ;
42
42
// + String.valueOf(System.currentTimeMillis());
43
43
44
44
/**
@@ -175,10 +175,6 @@ static File MakeBoardsSloeberTxt(File requestedFileToWorkAround) {
175
175
*/
176
176
static File MakePlatformSloeberTXT (File requestedFileToWorkAround ) {
177
177
178
- // zoek voor
179
- // recipe.objcopy.*.pattern=cmd /c *
180
- // verwijder cmd /c
181
-
182
178
if (!requestedFileToWorkAround .exists ()) {
183
179
return requestedFileToWorkAround ;
184
180
}
@@ -249,50 +245,12 @@ static File MakePlatformSloeberTXT(File requestedFileToWorkAround) {
249
245
platformTXT = platformTXT .replaceAll ("((tools\\ .[^\\ .]*).*\\ .pattern=.*)(\\ {version})" ,
250
246
"$1{$2.version}" );
251
247
252
- // String searchString = "{cmd.path}";
253
- // String cmdPathLine = findLineContaining(platformTXT, searchString);
254
- // while (null != cmdPathLine) {
255
- // if (cmdPathLine.startsWith(TOOLS)) {
256
- // int patternIndex = cmdPathLine.indexOf(PATTERN);
257
- // if (patternIndex > 0) {
258
- // int endIndex = cmdPathLine.lastIndexOf(DOT, patternIndex - 2);
259
- // String replaceString = "{" + cmdPathLine.substring(0, endIndex) +
260
- // ".cmd.path}";
261
- // String replaceLine = cmdPathLine.replace(searchString, replaceString);
262
- // platformTXT = platformTXT.replace(cmdPathLine, replaceLine);
263
- // cmdPathLine = findLineContaining(platformTXT, searchString);
264
- // }
265
- // } else if (cmdPathLine.charAt(0) == '#') {
266
- // platformTXT = platformTXT.replace(cmdPathLine, EMPTY);
267
- // cmdPathLine = findLineContaining(platformTXT, searchString);
268
- // }
269
- // else {
270
- // // TODO find a better way to handle this situation
271
- // // but it is better to continue than hang
272
- // cmdPathLine = null;
273
- // }
274
- // }
275
- //
276
- // // change {config.path} to fqn {config.path}
277
- // searchString = "{config.path}";
278
- // cmdPathLine = findLineContaining(platformTXT, searchString);
279
- // while (null != cmdPathLine) {
280
- // if (cmdPathLine.startsWith(TOOLS)) {
281
- // int patternIndex = cmdPathLine.indexOf(PATTERN);
282
- // if (patternIndex > 0) {
283
- // int endIndex = cmdPathLine.lastIndexOf(DOT, patternIndex - 2);
284
- // String replaceString = "{" + cmdPathLine.substring(0, endIndex) +
285
- // ".config.path}";
286
- // String replaceLine = cmdPathLine.replace(searchString, replaceString);
287
- // platformTXT = platformTXT.replace(cmdPathLine, replaceLine);
288
- // cmdPathLine = findLineContaining(platformTXT, searchString);
289
- // }
290
- // }
291
- // }
292
-
293
248
// workaround for infineon arm v1.4.0 overwriting the default to a wrong value
294
249
platformTXT = platformTXT .replace ("\n build.core.path" , "\n #line removed by Sloeber build.core.path" );
295
250
251
+ // workaround for jantje PC
252
+ platformTXT = platformTXT .replace ("{runtime.tools.mingw.path}/bin/" , "{runtime.tools.MinGW.path}/bin/" );
253
+
296
254
try { // https://github.com/Sloeber/arduino-eclipse-plugin/issues/1182#
297
255
Path platformTXTPath = new Path (requestedFileToWorkAround .toString ());
298
256
int totalSegments = platformTXTPath .segmentCount ();
0 commit comments