Skip to content

Commit 9d886c5

Browse files
author
jantje
committed
jantje pc didn't work
1 parent feaa08c commit 9d886c5

File tree

1 file changed

+4
-46
lines changed

1 file changed

+4
-46
lines changed

io.sloeber.core/src/io/sloeber/core/txt/WorkAround.java

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class WorkAround extends Const {
3838
// Each time this class is touched consider changing the String below to enforce
3939
// updates
4040
// 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 ";
4242
// + String.valueOf(System.currentTimeMillis());
4343

4444
/**
@@ -175,10 +175,6 @@ static File MakeBoardsSloeberTxt(File requestedFileToWorkAround) {
175175
*/
176176
static File MakePlatformSloeberTXT(File requestedFileToWorkAround) {
177177

178-
// zoek voor
179-
// recipe.objcopy.*.pattern=cmd /c *
180-
// verwijder cmd /c
181-
182178
if (!requestedFileToWorkAround.exists()) {
183179
return requestedFileToWorkAround;
184180
}
@@ -249,50 +245,12 @@ static File MakePlatformSloeberTXT(File requestedFileToWorkAround) {
249245
platformTXT = platformTXT.replaceAll("((tools\\.[^\\.]*).*\\.pattern=.*)(\\{version})",
250246
"$1{$2.version}");
251247

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-
293248
// workaround for infineon arm v1.4.0 overwriting the default to a wrong value
294249
platformTXT = platformTXT.replace("\nbuild.core.path", "\n#line removed by Sloeber build.core.path");
295250

251+
// workaround for jantje PC
252+
platformTXT = platformTXT.replace("{runtime.tools.mingw.path}/bin/", "{runtime.tools.MinGW.path}/bin/");
253+
296254
try { // https://github.com/Sloeber/arduino-eclipse-plugin/issues/1182#
297255
Path platformTXTPath = new Path(requestedFileToWorkAround.toString());
298256
int totalSegments = platformTXTPath.segmentCount();

0 commit comments

Comments
 (0)