--- a/src/Pure/Admin/component_cvc5.scala Thu Jan 02 08:37:55 2025 +0100
+++ b/src/Pure/Admin/component_cvc5.scala Thu Jan 02 12:13:18 2025 +0100
@@ -14,6 +14,7 @@
/* platform information */
sealed case class Download_Platform(platform_name: String, download_name: String) {
+ def is_arm: Boolean = platform_name.startsWith("arm64-")
def is_windows: Boolean = platform_name.endsWith("-windows")
}
@@ -59,11 +60,21 @@
Isabelle_System.make_directory(platform_dir)
val exe_path = Path.explode("cvc5").exe_if(platform.is_windows)
+ val exe = platform_dir + exe_path
Isabelle_System.download_file(download, archive_path, progress = progress)
Isabelle_System.extract(archive_path, download_dir, strip = true)
Isabelle_System.copy_file(download_dir + Path.basic("bin") + exe_path, platform_dir)
- File.set_executable(platform_dir + exe_path)
+ File.set_executable(exe)
+
+ if (platform.is_arm) {
+ Isabelle_System.move_file(exe, exe.ext("bin"))
+ File.write(exe, """#!/usr/bin/env bash
+
+"$CVC5_HOME/cvc5.bin" "$@"
+""")
+ File.set_executable(exe)
+ }
}
}