# HG changeset patch # User wenzelm # Date 1711470455 -3600 # Node ID ac10e32938dfded19252546d88b10a30e96dbc44 # Parent 914c4a81027d8e6b326231a6a09adce990b1c397 clarified signature: more operations; diff -r 914c4a81027d -r ac10e32938df src/Pure/System/isabelle_platform.scala --- a/src/Pure/System/isabelle_platform.scala Tue Mar 26 17:06:23 2024 +0100 +++ b/src/Pure/System/isabelle_platform.scala Tue Mar 26 17:27:35 2024 +0100 @@ -43,6 +43,11 @@ val ISABELLE_WINDOWS_PLATFORM64: String = get("ISABELLE_WINDOWS_PLATFORM64") val ISABELLE_APPLE_PLATFORM64: String = get("ISABELLE_APPLE_PLATFORM64") + def ISABELLE_PLATFORM(windows: Boolean = false, apple: Boolean = false): String = + proper_string(if_proper(windows, ISABELLE_WINDOWS_PLATFORM64)) orElse + proper_string(if_proper(apple, ISABELLE_APPLE_PLATFORM64)) orElse + proper_string(ISABELLE_PLATFORM64) getOrElse error("Missing ISABELLE_PLATFORM64") + def is_arm: Boolean = ISABELLE_PLATFORM64.startsWith("arm64-") || ISABELLE_APPLE_PLATFORM64.startsWith("arm64-") diff -r 914c4a81027d -r ac10e32938df src/Pure/Tools/dotnet_setup.scala --- a/src/Pure/Tools/dotnet_setup.scala Tue Mar 26 17:06:23 2024 +0100 +++ b/src/Pure/Tools/dotnet_setup.scala Tue Mar 26 17:27:35 2024 +0100 @@ -36,13 +36,8 @@ /* dotnet download and setup */ - def default_platform: String = { - val self = Isabelle_Platform.self - proper_string(self.ISABELLE_WINDOWS_PLATFORM64).getOrElse( - proper_string(self.ISABELLE_APPLE_PLATFORM64).getOrElse( - self.ISABELLE_PLATFORM64)) - } - + def default_platform: String = + Isabelle_Platform.self.ISABELLE_PLATFORM(windows = true, apple = true) def default_target_dir: Path = Components.default_components_base def default_install_url: String = "https://dot.net/v1/dotnet-install" def default_version: String = Isabelle_System.getenv_strict("ISABELLE_DOTNET_VERSION")