src/Pure/Admin/build_zipperposition.scala
changeset 76518 b30b8e23383c
parent 75394 42267c650205
child 76547 9fe5d8c70352
equal deleted inserted replaced
76517:b67c9ed2c810 76518:b30b8e23383c
    24 
    24 
    25 
    25 
    26       /* component */
    26       /* component */
    27 
    27 
    28       val component_name = "zipperposition-" + version
    28       val component_name = "zipperposition-" + version
    29       val component_dir = Isabelle_System.new_directory(target_dir + Path.basic(component_name))
    29       val component_dir =
    30       progress.echo("Component " + component_dir)
    30         Components.Directory.create(target_dir + Path.basic(component_name), progress = progress)
    31 
    31 
    32 
    32 
    33       /* platform */
    33       /* platform */
    34 
    34 
    35       val platform_name =
    35       val platform_name =
    36         proper_string(Isabelle_System.getenv("ISABELLE_PLATFORM64")) getOrElse
    36         proper_string(Isabelle_System.getenv("ISABELLE_PLATFORM64")) getOrElse
    37         error("No 64bit platform")
    37         error("No 64bit platform")
    38 
    38 
    39       val platform_dir = Isabelle_System.make_directory(component_dir + Path.basic(platform_name))
    39       val platform_dir =
       
    40         Isabelle_System.make_directory(component_dir.path + Path.basic(platform_name))
    40 
    41 
    41 
    42 
    42       /* build */
    43       /* build */
    43 
    44 
    44       progress.echo("OCaml/OPAM setup ...")
    45       progress.echo("OCaml/OPAM setup ...")
    51 
    52 
    52 
    53 
    53       /* install */
    54       /* install */
    54 
    55 
    55       Isabelle_System.copy_file(build_dir + Path.explode("doc/zipperposition/LICENSE"),
    56       Isabelle_System.copy_file(build_dir + Path.explode("doc/zipperposition/LICENSE"),
    56         component_dir)
    57         component_dir.path)
    57 
    58 
    58       val prg_path = Path.basic("zipperposition")
    59       val prg_path = Path.basic("zipperposition")
    59       val exe_path = prg_path.platform_exe
    60       val exe_path = prg_path.platform_exe
    60       Isabelle_System.copy_file(build_dir + Path.basic("bin") + prg_path, platform_dir + exe_path)
    61       Isabelle_System.copy_file(build_dir + Path.basic("bin") + prg_path, platform_dir + exe_path)
    61 
    62 
    65       }
    66       }
    66 
    67 
    67 
    68 
    68       /* settings */
    69       /* settings */
    69 
    70 
    70       val etc_dir = Isabelle_System.make_directory(component_dir + Path.basic("etc"))
    71       File.write(component_dir.settings,
    71       File.write(etc_dir + Path.basic("settings"),
       
    72         """# -*- shell-script -*- :mode=shellscript:
    72         """# -*- shell-script -*- :mode=shellscript:
    73 
    73 
    74 ZIPPERPOSITION_HOME="$COMPONENT/$ISABELLE_PLATFORM64"
    74 ZIPPERPOSITION_HOME="$COMPONENT/$ISABELLE_PLATFORM64"
    75 """)
    75 """)
    76 
    76 
    77 
    77 
    78       /* README */
    78       /* README */
    79 
    79 
    80       File.write(component_dir + Path.basic("README"),
    80       File.write(component_dir.README,
    81 """This is Zipperposition """ + version + """ from the OCaml/OPAM repository.
    81 """This is Zipperposition """ + version + """ from the OCaml/OPAM repository.
    82 
    82 
    83 
    83 
    84         Makarius
    84         Makarius
    85         """ + Date.Format.date(Date.now()) + "\n")
    85         """ + Date.Format.date(Date.now()) + "\n")