author | wenzelm |
Thu, 15 Aug 2024 12:43:17 +0200 | |
changeset 80712 | 05b16602a683 |
parent 80224 | db92e0b6a11a |
permissions | -rw-r--r-- |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
1 |
/* Title: Pure/Tools/dotnet_setup.scala |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
3 |
|
80010 | 4 |
Dynamic setup of Dotnet component. |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
5 |
*/ |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
6 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
7 |
package isabelle |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
8 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
9 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
10 |
object Dotnet_Setup { |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
11 |
/* platforms */ |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
12 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
13 |
sealed case class Platform_Info( |
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
14 |
platform: String, |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
15 |
os: String = "", |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
16 |
arch: String = "x64", |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
17 |
ext: String = "sh", |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
18 |
exec: String = "bash", |
80005 | 19 |
check: () => Unit = () => () |
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
20 |
) extends Platform.Info |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
21 |
|
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
22 |
val all_platforms: List[Platform_Info] = |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
23 |
List( |
80005 | 24 |
Platform_Info("arm64-linux", os = "linux", arch = "arm64"), |
25 |
Platform_Info("x86_64-linux", os = "linux"), |
|
26 |
Platform_Info("arm64-darwin", os = "osx", arch = "arm64"), |
|
27 |
Platform_Info("x86_64-darwin", os = "osx"), |
|
28 |
Platform_Info("x86_64-windows", |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
29 |
ext = "ps1", |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
30 |
exec = "powershell -ExecutionPolicy ByPass", |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
31 |
check = () => Isabelle_System.require_command("powershell", "-NoProfile -Command Out-Null"))) |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
32 |
|
80038 | 33 |
def check_platform(spec: String): String = Platform.Info.check(all_platforms, spec) |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
34 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
35 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
36 |
/* dotnet download and setup */ |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
37 |
|
80009 | 38 |
def default_platform: String = |
39 |
Isabelle_Platform.self.ISABELLE_PLATFORM(windows = true, apple = true) |
|
77084 | 40 |
def default_target_dir: Path = Components.default_components_base |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
41 |
def default_install_url: String = "https://dot.net/v1/dotnet-install" |
80006
d89685d3d306
provide ISABELLE_DOTNET_VERSION via settings, following "isabelle ghc_setup";
wenzelm
parents:
80005
diff
changeset
|
42 |
def default_version: String = Isabelle_System.getenv_strict("ISABELLE_DOTNET_VERSION") |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
43 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
44 |
def dotnet_setup( |
80012 | 45 |
platforms: List[String] = List(default_platform), |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
46 |
target_dir: Path = default_target_dir, |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
47 |
install_url: String = default_install_url, |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
48 |
version: String = default_version, |
76467 | 49 |
force: Boolean = false, |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
50 |
dry_run: Boolean = false, |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
51 |
progress: Progress = new Progress |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
52 |
): Unit = { |
80038 | 53 |
platforms.foreach(check_platform) |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
54 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
55 |
|
80012 | 56 |
/* component directory */ |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
57 |
|
80012 | 58 |
val component_dir = |
59 |
Components.Directory( |
|
60 |
target_dir + Path.explode(if (version.isEmpty) "dotnet-latest" else "dotnet-" + version)) |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
61 |
|
80012 | 62 |
if (!dry_run) { |
63 |
progress.echo("Component directory " + component_dir) |
|
64 |
component_dir.create(permissive = true) |
|
76466
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
65 |
|
80012 | 66 |
component_dir.write_settings(""" |
76466
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
67 |
ISABELLE_DOTNET_ROOT="$COMPONENT" |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
68 |
|
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
69 |
if [ -n "$ISABELLE_WINDOWS_PLATFORM64" -a -d "$ISABELLE_DOTNET_ROOT/$ISABELLE_WINDOWS_PLATFORM64" ]; then |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
70 |
ISABELLE_DOTNET="$ISABELLE_DOTNET_ROOT/$ISABELLE_WINDOWS_PLATFORM64/dotnet.exe" |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
71 |
elif [ -n "$ISABELLE_APPLE_PLATFORM64" -a -d "$ISABELLE_DOTNET_ROOT/$ISABELLE_APPLE_PLATFORM64" ]; then |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
72 |
ISABELLE_DOTNET="$ISABELLE_DOTNET_ROOT/$ISABELLE_APPLE_PLATFORM64/dotnet" |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
73 |
elif [ -d "$ISABELLE_DOTNET_ROOT/$ISABELLE_PLATFORM64" ]; then |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
74 |
ISABELLE_DOTNET="$ISABELLE_DOTNET_ROOT/$ISABELLE_PLATFORM64/dotnet" |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
75 |
fi |
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
76 |
|
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
77 |
DOTNET_CLI_TELEMETRY_OPTOUT="true" |
76469
98cfe33db5a7
further attempts to confine dotnet to $ISABELLE_HOME_USER;
wenzelm
parents:
76468
diff
changeset
|
78 |
DOTNET_CLI_HOME="$(platform_path "$ISABELLE_HOME_USER/dotnet")" |
76466
730dadb82936
clarified component settings: always update existing version;
wenzelm
parents:
76464
diff
changeset
|
79 |
""") |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
80 |
|
80012 | 81 |
File.write(component_dir.README, |
82 |
"""This installation of Dotnet has been produced via "isabelle dotnet_setup". |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
83 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
84 |
|
80012 | 85 |
Makarius |
86 |
""" + Date.Format.date(Date.now()) + "\n") |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
87 |
|
80012 | 88 |
for (old <- proper_string(Isabelle_System.getenv("ISABELLE_DOTNET_ROOT"))) { |
89 |
Components.update_components(false, Path.explode(old)) |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
90 |
} |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
91 |
|
80012 | 92 |
Components.update_components(true, component_dir.path) |
93 |
} |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
94 |
|
80012 | 95 |
|
96 |
/* platform directories */ |
|
97 |
||
98 |
for (platform <- all_platforms if platforms.exists(platform.is)) { |
|
99 |
progress.expose_interrupt() |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
100 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
101 |
Isabelle_System.with_tmp_file("install", ext = platform.ext) { install => |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
102 |
Isabelle_System.download_file(install_url + "." + platform.ext, install) |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
103 |
|
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
104 |
val platform_dir = component_dir.path + platform.path |
76467 | 105 |
if (platform_dir.is_dir && !force) { |
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
106 |
progress.echo_warning("Platform " + platform + " already installed") |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
107 |
} |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
108 |
else { |
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
109 |
progress.echo("Platform " + platform + " ...") |
76463 | 110 |
platform.check() |
76467 | 111 |
if (platform_dir.is_dir && force) Isabelle_System.rm_tree(platform_dir) |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
112 |
val script = |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
113 |
platform.exec + " " + File.bash_platform_path(install) + |
77369 | 114 |
if_proper(version, " -Version " + Bash.string(version)) + |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
115 |
" -Architecture " + Bash.string(platform.arch) + |
77369 | 116 |
if_proper(platform.os, " -OS " + Bash.string(platform.os)) + |
80008
914c4a81027d
clarified signature: explicit type Platform.Info with derived operations;
wenzelm
parents:
80006
diff
changeset
|
117 |
" -InstallDir " + File.bash_path(platform.path) + |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
118 |
(if (dry_run) " -DryRun" else "") + |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
119 |
" -NoPath" |
77510
f5d6cd98b16a
clarified signature: manage "verbose" flag via "progress";
wenzelm
parents:
77369
diff
changeset
|
120 |
progress.bash(script, echo = progress.verbose, |
80224
db92e0b6a11a
clarified signature: prefer symbolic isabelle.Path over physical java.io.File;
wenzelm
parents:
80042
diff
changeset
|
121 |
cwd = if (dry_run) Path.current else component_dir.path).check |
76470 | 122 |
for (exe <- File.find_files(platform_dir.file, pred = _.getName.endsWith(".exe"))) { |
78158 | 123 |
File.set_executable(File.path(exe)) |
76470 | 124 |
} |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
125 |
} |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
126 |
} |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
127 |
} |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
128 |
} |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
129 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
130 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
131 |
/* Isabelle tool wrapper */ |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
132 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
133 |
val isabelle_tool = |
80010 | 134 |
Isabelle_Tool("dotnet_setup", "dynamic setup of Dotnet component (for Fsharp)", |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
135 |
Scala_Project.here, |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
136 |
{ args => |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
137 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
138 |
var target_dir = default_target_dir |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
139 |
var install_url = default_install_url |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
140 |
var version = default_version |
76467 | 141 |
var force = false |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
142 |
var dry_run = false |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
143 |
var platforms = List(default_platform) |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
144 |
var verbose = false |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
145 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
146 |
val getopts = Getopts(""" |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
147 |
Usage: isabelle dotnet_setup [OPTIONS] |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
148 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
149 |
Options are: |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
150 |
-D DIR target directory (default: """ + default_target_dir.expand + """) |
76468 | 151 |
-I URL URL for install script without extension |
152 |
(default: """ + quote(default_install_url) + """) |
|
80042 | 153 |
-V VERSION version: empty means "latest" |
154 |
(default: ISABELLE_DOTNET_VERSION=""" + quote(default_version) + """) |
|
76467 | 155 |
-f force fresh installation of specified platforms |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
156 |
-n dry run: try download without installation |
80039 | 157 |
-p PLATFORMS comma-separated list of platform specifications: "all" or |
76468 | 158 |
as family or formal name (default: """ + quote(default_platform) + """) |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
159 |
-v verbose |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
160 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
161 |
Download the Dotnet / Fsharp platform and configure it as Isabelle component. |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
162 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
163 |
See also: |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
164 |
https://fsharp.org |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
165 |
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script |
76464 | 166 |
https://learn.microsoft.com/en-us/dotnet/core/tools/telemetry |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
167 |
""", |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
168 |
"D:" -> (arg => target_dir = Path.explode(arg)), |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
169 |
"I:" -> (arg => install_url = arg), |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
170 |
"V:" -> (arg => version = arg), |
76467 | 171 |
"f" -> (_ => force = true), |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
172 |
"n" -> (_ => dry_run = true), |
80038 | 173 |
"p:" -> (arg => platforms = space_explode(',', arg).map(check_platform)), |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
174 |
"v" -> (_ => verbose = true)) |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
175 |
|
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
176 |
val more_args = getopts(args) |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
177 |
if (more_args.nonEmpty) getopts.usage() |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
178 |
|
77510
f5d6cd98b16a
clarified signature: manage "verbose" flag via "progress";
wenzelm
parents:
77369
diff
changeset
|
179 |
val progress = new Console_Progress(verbose = verbose) |
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
180 |
|
80012 | 181 |
dotnet_setup(platforms = platforms, target_dir = target_dir, install_url = install_url, |
182 |
version = version, force = force, dry_run = dry_run, progress = progress) |
|
76458
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
183 |
}) |
cc6fd1695294
support for Dotnet / Fsharp platform, via dynamically installed Isabelle component;
wenzelm
parents:
diff
changeset
|
184 |
} |
80026 | 185 |
|
186 |
class Dotnet_Setup extends Setup_Tool("dotnet_setup", "ISABELLE_DOTNET_SETUP") { |
|
187 |
override val test_file: Path = Path.explode("lib/Tools/dotnet") |
|
188 |
} |