(tool, description)
| 494 | this.addMCConfigDTSFile(tool, signatures); |
| 495 | } |
| 496 | mcRun(tool, description) { |
| 497 | let path = tool.fragmentPath.slice(0, -3) + "-ffi.mk"; |
| 498 | path = tool.resolveFilePath(path); |
| 499 | if (!path) |
| 500 | throw new Error("No FFI support!"); |
| 501 | tool.fragmentPath = path; |
| 502 | const signatures = this.parseSignatures(description.functions); |
| 503 | if (tool.platform == "pebble") { |
| 504 | path = tool.mainPath + tool.slash + ".." + tool.slash + "c"; |
| 505 | path = tool.resolveDirectoryPath(path); |
| 506 | if (!path) |
| 507 | throw new Error("No c directory!"); |
| 508 | const file = new TabFile(path + tool.slash + "mc.ffi.c", tool); |
| 509 | this.generateCFile(file, signatures, true, false); |
| 510 | file.close(); |
| 511 | } |
| 512 | else { |
| 513 | this.addSources(tool, description.sources); |
| 514 | this.addMCRunCFile(tool, signatures); |
| 515 | this.addMCRunCFolder(tool); |
| 516 | } |
| 517 | this.addMCRunDTSFile(tool, signatures); |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | export default FFIGlue; |
no test coverage detected