equal
deleted
inserted
replaced
300 val script_path = isabelle_target + Path.explode("lib/scripts/Isabelle_app") |
300 val script_path = isabelle_target + Path.explode("lib/scripts/Isabelle_app") |
301 File.write(script_path, script) |
301 File.write(script_path, script) |
302 File.set_executable(script_path, true) |
302 File.set_executable(script_path, true) |
303 |
303 |
304 val component_dir = isabelle_target + Path.explode("contrib/Isabelle_app") |
304 val component_dir = isabelle_target + Path.explode("contrib/Isabelle_app") |
305 File.move( |
305 Isabelle_System.move_file( |
306 component_dir + Path.explode(Platform.standard_platform(platform)) + Path.explode("Isabelle"), |
306 component_dir + Path.explode(Platform.standard_platform(platform)) + Path.explode("Isabelle"), |
307 isabelle_target + Path.explode(isabelle_name)) |
307 isabelle_target + Path.explode(isabelle_name)) |
308 Isabelle_System.rm_tree(component_dir) |
308 Isabelle_System.rm_tree(component_dir) |
309 } |
309 } |
310 |
310 |
652 // macOS application bundle |
652 // macOS application bundle |
653 |
653 |
654 val app_contents = isabelle_target + Path.explode("Contents") |
654 val app_contents = isabelle_target + Path.explode("Contents") |
655 |
655 |
656 for (icon <- List("lib/logo/isabelle.icns", "lib/logo/theory.icns")) { |
656 for (icon <- List("lib/logo/isabelle.icns", "lib/logo/theory.icns")) { |
657 File.copy(isabelle_target + Path.explode(icon), |
657 Isabelle_System.copy_file(isabelle_target + Path.explode(icon), |
658 Isabelle_System.make_directory(app_contents + Path.explode("Resources"))) |
658 Isabelle_System.make_directory(app_contents + Path.explode("Resources"))) |
659 } |
659 } |
660 |
660 |
661 make_isabelle_plist( |
661 make_isabelle_plist( |
662 app_contents + Path.explode("Info.plist"), isabelle_name, release.ident) |
662 app_contents + Path.explode("Info.plist"), isabelle_name, release.ident) |
674 |
674 |
675 val archive_name = isabelle_name + "_macos.tar.gz" |
675 val archive_name = isabelle_name + "_macos.tar.gz" |
676 progress.echo("Packaging " + archive_name + " ...") |
676 progress.echo("Packaging " + archive_name + " ...") |
677 |
677 |
678 val isabelle_app = Path.explode(isabelle_name + ".app") |
678 val isabelle_app = Path.explode(isabelle_name + ".app") |
679 File.move(tmp_dir + Path.explode(isabelle_name), tmp_dir + isabelle_app) |
679 Isabelle_System.move_file(tmp_dir + Path.explode(isabelle_name), |
|
680 tmp_dir + isabelle_app) |
680 |
681 |
681 execute_tar(tmp_dir, |
682 execute_tar(tmp_dir, |
682 "-czf " + File.bash_path(release.dist_dir + Path.explode(archive_name)) + " " + |
683 "-czf " + File.bash_path(release.dist_dir + Path.explode(archive_name)) + " " + |
683 File.bash_path(isabelle_app)) |
684 File.bash_path(isabelle_app)) |
684 |
685 |
688 _.replaceAll("foldPainter=.*", "foldPainter=Square")) |
689 _.replaceAll("foldPainter=.*", "foldPainter=Square")) |
689 |
690 |
690 |
691 |
691 // application launcher |
692 // application launcher |
692 |
693 |
693 File.move(isabelle_target + Path.explode("contrib/windows_app"), tmp_dir) |
694 Isabelle_System.move_file(isabelle_target + Path.explode("contrib/windows_app"), tmp_dir) |
694 |
695 |
695 val app_template = Path.explode("~~/Admin/Windows/launch4j") |
696 val app_template = Path.explode("~~/Admin/Windows/launch4j") |
696 |
697 |
697 make_isabelle_options( |
698 make_isabelle_options( |
698 isabelle_target + Path.explode(isabelle_name + ".l4j.ini"), |
699 isabelle_target + Path.explode(isabelle_name + ".l4j.ini"), |
715 .replace("\\jdk\\", "\\" + jdk_component + "\\")) |
716 .replace("\\jdk\\", "\\" + jdk_component + "\\")) |
716 |
717 |
717 execute(tmp_dir, |
718 execute(tmp_dir, |
718 "\"windows_app/launch4j-${ISABELLE_PLATFORM_FAMILY}/launch4j\" isabelle.xml") |
719 "\"windows_app/launch4j-${ISABELLE_PLATFORM_FAMILY}/launch4j\" isabelle.xml") |
719 |
720 |
720 File.copy(app_template + Path.explode("manifest.xml"), |
721 Isabelle_System.copy_file(app_template + Path.explode("manifest.xml"), |
721 isabelle_target + isabelle_exe.ext("manifest")) |
722 isabelle_target + isabelle_exe.ext("manifest")) |
722 |
723 |
723 |
724 |
724 // Cygwin setup |
725 // Cygwin setup |
725 |
726 |
726 val cygwin_template = Path.explode("~~/Admin/Windows/Cygwin") |
727 val cygwin_template = Path.explode("~~/Admin/Windows/Cygwin") |
727 |
728 |
728 File.copy(cygwin_template + Path.explode("Cygwin-Terminal.bat"), isabelle_target) |
729 Isabelle_System.copy_file(cygwin_template + Path.explode("Cygwin-Terminal.bat"), |
|
730 isabelle_target) |
729 |
731 |
730 val cygwin_mirror = |
732 val cygwin_mirror = |
731 File.read(isabelle_target + Path.explode("contrib/cygwin/isabelle/cygwin_mirror")) |
733 File.read(isabelle_target + Path.explode("contrib/cygwin/isabelle/cygwin_mirror")) |
732 |
734 |
733 val cygwin_bat = Path.explode("Cygwin-Setup.bat") |
735 val cygwin_bat = Path.explode("Cygwin-Setup.bat") |
735 File.read(cygwin_template + cygwin_bat).replace("{MIRROR}", cygwin_mirror)) |
737 File.read(cygwin_template + cygwin_bat).replace("{MIRROR}", cygwin_mirror)) |
736 File.set_executable(isabelle_target + cygwin_bat, true) |
738 File.set_executable(isabelle_target + cygwin_bat, true) |
737 |
739 |
738 for (name <- List("isabelle/postinstall", "isabelle/rebaseall")) { |
740 for (name <- List("isabelle/postinstall", "isabelle/rebaseall")) { |
739 val path = Path.explode(name) |
741 val path = Path.explode(name) |
740 File.copy(cygwin_template + path, |
742 Isabelle_System.copy_file(cygwin_template + path, |
741 isabelle_target + Path.explode("contrib/cygwin") + path) |
743 isabelle_target + Path.explode("contrib/cygwin") + path) |
742 } |
744 } |
743 |
745 |
744 execute(isabelle_target, |
746 execute(isabelle_target, |
745 """find . -type f -not -name "*.exe" -not -name "*.dll" """ + |
747 """find . -type f -not -name "*.exe" -not -name "*.dll" """ + |
806 HTML.subsection("Repositories"), |
808 HTML.subsection("Repositories"), |
807 HTML.itemize( |
809 HTML.itemize( |
808 List(List(isabelle_link)) ::: (if (afp_rev == "") Nil else List(List(afp_link)))))) |
810 List(List(isabelle_link)) ::: (if (afp_rev == "") Nil else List(List(afp_link)))))) |
809 |
811 |
810 for ((bundle, _) <- website_platform_bundles) |
812 for ((bundle, _) <- website_platform_bundles) |
811 File.copy(release.dist_dir + Path.explode(bundle), dir) |
813 Isabelle_System.copy_file(release.dist_dir + Path.explode(bundle), dir) |
812 } |
814 } |
813 |
815 |
814 |
816 |
815 /* HTML library */ |
817 /* HTML library */ |
816 |
818 |