equal
deleted
inserted
replaced
110 |
110 |
111 val platform_dir = Path.explode(polyml_platform) |
111 val platform_dir = Path.explode(polyml_platform) |
112 Isabelle_System.rm_tree(platform_dir) |
112 Isabelle_System.rm_tree(platform_dir) |
113 Isabelle_System.make_directory(platform_dir) |
113 Isabelle_System.make_directory(platform_dir) |
114 |
114 |
115 for (file <- sha1_files) File.copy(file, platform_dir) |
115 for (file <- sha1_files) Isabelle_System.copy_file(file, platform_dir) |
116 |
116 |
117 for { |
117 for { |
118 d <- List("target/bin", "target/lib") |
118 d <- List("target/bin", "target/lib") |
119 dir = root + Path.explode(d) |
119 dir = root + Path.explode(d) |
120 entry <- File.read_dir(dir) |
120 entry <- File.read_dir(dir) |
121 } File.move(dir + Path.explode(entry), platform_dir) |
121 } Isabelle_System.move_file(dir + Path.explode(entry), platform_dir) |
122 |
122 |
123 Executable.libraries_closure( |
123 Executable.libraries_closure( |
124 platform_dir + Path.basic("poly").platform_exe, mingw = mingw, filter = info.libs) |
124 platform_dir + Path.basic("poly").platform_exe, mingw = mingw, filter = info.libs) |
125 |
125 |
126 |
126 |
157 Isabelle_System.gnutar("-xzf " + File.bash_path(source_archive), dir = component_dir).check |
157 Isabelle_System.gnutar("-xzf " + File.bash_path(source_archive), dir = component_dir).check |
158 } |
158 } |
159 |
159 |
160 val src_dir = component_dir + Path.explode("src") |
160 val src_dir = component_dir + Path.explode("src") |
161 File.read_dir(component_dir) match { |
161 File.read_dir(component_dir) match { |
162 case List(s) => File.move(component_dir + Path.basic(s), src_dir) |
162 case List(s) => Isabelle_System.move_file(component_dir + Path.basic(s), src_dir) |
163 case _ => error("Source archive contains multiple directories") |
163 case _ => error("Source archive contains multiple directories") |
164 } |
164 } |
165 |
165 |
166 val lines = split_lines(File.read(src_dir + Path.explode("RootX86.ML"))) |
166 val lines = split_lines(File.read(src_dir + Path.explode("RootX86.ML"))) |
167 val ml_files = |
167 val ml_files = |
185 sha1_root: Option[Path] = None) |
185 sha1_root: Option[Path] = None) |
186 { |
186 { |
187 Isabelle_System.new_directory(component_dir) |
187 Isabelle_System.new_directory(component_dir) |
188 extract_sources(source_archive, component_dir) |
188 extract_sources(source_archive, component_dir) |
189 |
189 |
190 File.copy(Path.explode("~~/Admin/polyml/README"), component_dir) |
190 Isabelle_System.copy_file(Path.explode("~~/Admin/polyml/README"), component_dir) |
191 |
191 |
192 val etc_dir = Isabelle_System.make_directory(component_dir + Path.explode("etc")) |
192 val etc_dir = Isabelle_System.make_directory(component_dir + Path.explode("etc")) |
193 File.copy(Path.explode("~~/Admin/polyml/settings"), etc_dir) |
193 Isabelle_System.copy_file(Path.explode("~~/Admin/polyml/settings"), etc_dir) |
194 |
194 |
195 sha1_root match { |
195 sha1_root match { |
196 case Some(dir) => |
196 case Some(dir) => |
197 Mercurial.repository(dir).archive(File.standard_path(component_dir + Path.explode("sha1"))) |
197 Mercurial.repository(dir).archive(File.standard_path(component_dir + Path.explode("sha1"))) |
198 case None => |
198 case None => |