equal
deleted
inserted
replaced
16 |
16 |
17 object Isabelle_System |
17 object Isabelle_System |
18 { |
18 { |
19 /* settings */ |
19 /* settings */ |
20 |
20 |
21 def settings(): JMap[String, String] = Isabelle_Env.settings() |
21 def settings(): JMap[String, String] = isabelle.setup.Isabelle_Env.settings() |
22 |
22 |
23 def getenv(name: String, env: JMap[String, String] = settings()): String = |
23 def getenv(name: String, env: JMap[String, String] = settings()): String = |
24 Option(env.get(name)).getOrElse("") |
24 Option(env.get(name)).getOrElse("") |
25 |
25 |
26 def getenv_strict(name: String, env: JMap[String, String] = settings()): String = |
26 def getenv_strict(name: String, env: JMap[String, String] = settings()): String = |
49 |
49 |
50 /* init settings + services */ |
50 /* init settings + services */ |
51 |
51 |
52 def init(isabelle_root: String = "", cygwin_root: String = ""): Unit = |
52 def init(isabelle_root: String = "", cygwin_root: String = ""): Unit = |
53 { |
53 { |
54 Isabelle_Env.init(isabelle_root, cygwin_root) |
54 isabelle.setup.Isabelle_Env.init(isabelle_root, cygwin_root) |
55 synchronized { |
55 synchronized { |
56 if (_services.isEmpty) { |
56 if (_services.isEmpty) { |
57 val variable = "ISABELLE_SCALA_SERVICES" |
57 val variable = "ISABELLE_SCALA_SERVICES" |
58 val services = |
58 val services = |
59 for (name <- space_explode(':', getenv_strict(variable))) |
59 for (name <- space_explode(':', getenv_strict(variable))) |
251 val target = if (dst_file.isDirectory) new JFile(dst_file, src_file.getName) else dst_file |
251 val target = if (dst_file.isDirectory) new JFile(dst_file, src_file.getName) else dst_file |
252 |
252 |
253 if (force) target.delete |
253 if (force) target.delete |
254 |
254 |
255 def cygwin_link(): Unit = |
255 def cygwin_link(): Unit = |
256 Isabelle_Env.cygwin_link(File.standard_path(src), target) |
256 isabelle.setup.Isabelle_Env.cygwin_link(File.standard_path(src), target) |
257 |
257 |
258 try { Files.createSymbolicLink(target.toPath, src_file.toPath) } |
258 try { Files.createSymbolicLink(target.toPath, src_file.toPath) } |
259 catch { |
259 catch { |
260 case _: UnsupportedOperationException if Platform.is_windows => cygwin_link() |
260 case _: UnsupportedOperationException if Platform.is_windows => cygwin_link() |
261 case _: FileSystemException if Platform.is_windows => cygwin_link() |
261 case _: FileSystemException if Platform.is_windows => cygwin_link() |