print copyright message better

This commit is contained in:
Irmen de Jong
2025-04-17 23:09:28 +02:00
parent dd2d466350
commit c82586db28

View File

@@ -75,17 +75,13 @@ private fun compileMain(args: Array<String>): Boolean {
try { try {
cli.parse(args) cli.parse(args)
} catch (e: IllegalStateException) { } catch (e: IllegalStateException) {
banner()
System.err.println(e.message) System.err.println(e.message)
return false return false
} }
if(quietAll!=true) { if(quietAll!=true)
println("\nProg8 compiler v${prog8.buildversion.VERSION} by Irmen de Jong (irmen@razorvine.net)") banner()
if('-' in prog8.buildversion.VERSION) {
println("Prerelease version from git commit ${prog8.buildversion.GIT_SHA.take(8)} in branch ${prog8.buildversion.GIT_BRANCH}")
}
println("This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html\n")
}
val outputPath = pathFrom(outputDir) val outputPath = pathFrom(outputDir)
if(!outputPath.toFile().isDirectory) { if(!outputPath.toFile().isDirectory) {
@@ -310,6 +306,14 @@ private fun compileMain(args: Array<String>): Boolean {
return true return true
} }
private fun banner() {
println("\nProg8 compiler v${prog8.buildversion.VERSION} by Irmen de Jong (irmen@razorvine.net)")
if('-' in prog8.buildversion.VERSION) {
println("Prerelease version from git commit ${prog8.buildversion.GIT_SHA.take(8)} in branch ${prog8.buildversion.GIT_BRANCH}")
}
println("This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html\n")
}
fun convertFloatToBytes(number: String, target: String) { fun convertFloatToBytes(number: String, target: String) {
val tgt = getCompilationTargetByName(target) val tgt = getCompilationTargetByName(target)
val dbl = number.toDouble() val dbl = number.toDouble()