1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-06-28 23:29:51 +00:00

Generate .INF file for every output file

This commit is contained in:
Karol Stasiak 2020-04-06 17:54:59 +02:00
parent eba91e26e5
commit 0cba2dec04

View File

@ -157,6 +157,12 @@ object Main {
errorReporting.debug("Writing output to " + path.toAbsolutePath)
errorReporting.debug(s"Total output size: ${code.length} bytes")
Files.write(path, code)
if (platform.generateBbcMicroInfFile) {
val start = platform.codeAllocators(bankName).startAt
val codeLength = code.length
Files.write(Paths.get(prgOutput +".inf"),
s"${path.getFileName} ${start.toHexString} ${start.toHexString} ${codeLength.toHexString}".getBytes(StandardCharsets.UTF_8))
}
}
errorReporting.debug(s"Total time: ${Math.round((System.nanoTime() - startTime)/1e6)} ms")
c.runFileName.foreach{ program =>
@ -165,12 +171,6 @@ object Main {
errorReporting.debug(s"Running: ${cmdline.mkString(" ")}")
new ProcessBuilder(cmdline.toArray: _*).directory(new File(program).getParentFile).start()
}
if (platform.generateBbcMicroInfFile) {
val start = platform.codeAllocators("default").startAt
val codeLength = result.code("default").length
Files.write(Paths.get(defaultPrgOutput+".inf"),
s"$defaultPrgOutput ${start.toHexString} ${start.toHexString} ${codeLength.toHexString}".getBytes(StandardCharsets.UTF_8))
}
}
private def getDefaultIncludePath: Either[String, String] = {