# HG changeset patch # User wenzelm # Date 1544309623 -3600 # Node ID d072f3287ffa6998cb0d590913b8e45889f8adf2 # Parent 10fc8a6482505e1622b6efda87482004378180ac discontinued somewhat point dmg: plain .tar.gz is smaller and more convenient to install; diff -r 10fc8a648250 -r d072f3287ffa Admin/Release/CHECKLIST --- a/Admin/Release/CHECKLIST Sat Dec 08 23:50:56 2018 +0100 +++ b/Admin/Release/CHECKLIST Sat Dec 08 23:53:43 2018 +0100 @@ -86,7 +86,7 @@ - fully-automated packaging (e.g. on lxbroy10): - hg up -r DISTNAME && Admin/build_release -M macbroy30 -O -l -R DISTNAME /home/isabelle/dist + hg up -r DISTNAME && Admin/build_release -O -l -R DISTNAME /home/isabelle/dist - Docker image: diff -r 10fc8a648250 -r d072f3287ffa Admin/components/bundled-macos --- a/Admin/components/bundled-macos Sat Dec 08 23:50:56 2018 +0100 +++ b/Admin/components/bundled-macos Sat Dec 08 23:53:43 2018 +0100 @@ -1,2 +1,2 @@ #additional components to be bundled for release -macos_app-20181205 +macos_app-20181208 diff -r 10fc8a648250 -r d072f3287ffa Admin/components/components.sha1 --- a/Admin/components/components.sha1 Sat Dec 08 23:50:56 2018 +0100 +++ b/Admin/components/components.sha1 Sat Dec 08 23:53:43 2018 +0100 @@ -157,6 +157,7 @@ 0aab4f73ff7f5e36f33276547e10897e1e56fb1d macos_app-20130716.tar.gz ad5d0e640ce3609a885cecab645389a2204e03bb macos_app-20150916.tar.gz 400af57ec5cd51f96928d9de00d077524a6fe316 macos_app-20181205.tar.gz +3bc42b8e22f0be5ec5614f1914066164c83498f8 macos_app-20181208.tar.gz 26df569cee9c2fd91b9ac06714afd43f3b37a1dd nunchaku-0.3.tar.gz e573f2cbb57eb7b813ed5908753cfe2cb41033ca nunchaku-0.5.tar.gz fe57793aca175336deea4f5e9c0d949a197850ac opam-1.2.2.tar.gz diff -r 10fc8a648250 -r d072f3287ffa src/Pure/Admin/build_release.scala --- a/src/Pure/Admin/build_release.scala Sat Dec 08 23:50:56 2018 +0100 +++ b/src/Pure/Admin/build_release.scala Sat Dec 08 23:53:43 2018 +0100 @@ -14,10 +14,9 @@ sealed case class Bundle_Info( platform: Platform.Family.Value, platform_description: String, - main: String, - fallback: Option[String]) + name: String) { - def names: List[String] = main :: fallback.toList + def path: Path = Path.explode(name) } class Release private[Build_Release]( @@ -39,12 +38,9 @@ def bundle_info(platform: Platform.Family.Value): Bundle_Info = platform match { - case Platform.Family.linux => - Bundle_Info(platform, "Linux", dist_name + "_linux.tar.gz", None) - case Platform.Family.macos => - Bundle_Info(platform, "Mac OS X", dist_name + ".dmg", Some(dist_name + "_macos.tar.gz")) - case Platform.Family.windows => - Bundle_Info(platform, "Windows", dist_name + ".exe", None) + case Platform.Family.linux => Bundle_Info(platform, "Linux", dist_name + "_linux.tar.gz") + case Platform.Family.macos => Bundle_Info(platform, "Mac OS X", dist_name + "_macos.tar.gz") + case Platform.Family.windows => Bundle_Info(platform, "Windows", dist_name + ".exe") } } @@ -238,8 +234,7 @@ more_components: List[Path] = Nil, website: Option[Path] = None, build_library: Boolean = false, - parallel_jobs: Int = 1, - remote_mac: String = ""): Release = + parallel_jobs: Int = 1): Release = { val hg = Mercurial.repository(Path.explode("$ISABELLE_HOME")) @@ -392,9 +387,7 @@ val bundle_infos = platform_families.map(release.bundle_info) for (bundle_info <- bundle_infos) { - val bundle = - (if (remote_mac.isEmpty) bundle_info.fallback else None) getOrElse bundle_info.main - val bundle_archive = release.dist_dir + Path.explode(bundle) + val bundle_archive = release.dist_dir + bundle_info.path if (bundle_archive.is_file && more_components.isEmpty) progress.echo_warning("Application bundle already exists: " + bundle_archive) else { @@ -487,6 +480,7 @@ "-czf " + File.bash_path(release.dist_dir + Path.explode(archive_name)) + " " + Bash.string(isabelle_name)) + case Platform.Family.macos => File.write(isabelle_target + jedit_props, File.read(isabelle_target + jedit_props) @@ -499,11 +493,10 @@ // MacOS application bundle File.move(isabelle_target + Path.explode("contrib/macos_app"), tmp_dir) - val dmg_dir = tmp_dir + Path.explode("macos_app/dmg") val isabelle_app = Path.explode(isabelle_name + ".app") - val app_dir = dmg_dir + isabelle_app - File.move(dmg_dir + Path.explode("Isabelle.app"), app_dir) + val app_dir = tmp_dir + isabelle_app + File.move(tmp_dir + Path.explode("macos_app/Isabelle.app"), app_dir) val app_contents = app_dir + Path.explode("Contents") val app_resources = app_contents + Path.explode("Resources") @@ -539,38 +532,14 @@ force = true) - // application archive: dmg or .tar.gz - - val isabelle_dmg = Path.explode(isabelle_name + ".dmg") - (release.dist_dir + isabelle_dmg).file.delete - - remote_mac match { - case SSH.Target(user, host) => - progress.echo("Packaging " + isabelle_dmg + " (via host " + quote(host) + ") ...") - using(SSH.open_session(options, host = host, user = user))(ssh => - { - val dmg_archive = Path.explode("dmg.tar") - execute_tar(dmg_dir, "-cf " + File.bash_path(tmp_dir + dmg_archive) + " .") + // application archive - ssh.with_tmp_dir(remote_dir => - { - val cd = "cd " + ssh.bash_path(remote_dir) + "; " - ssh.write_file(remote_dir + dmg_archive, tmp_dir + dmg_archive) - ssh.execute( - cd + "mkdir dmg && tar -C dmg -xf " + ssh.bash_path(dmg_archive)).check - ssh.execute( - cd + "hdiutil create -srcfolder dmg -volname Isabelle " + - ssh.bash_path(isabelle_dmg)).check - ssh.read_file(remote_dir + isabelle_dmg, release.dist_dir + isabelle_dmg) - }) - }) - case _ => - val archive_name = isabelle_name + "_macos.tar.gz" - progress.echo("Packaging " + archive_name + " ...") - execute_tar(dmg_dir, - "-czf " + File.bash_path(release.dist_dir + Path.explode(archive_name)) + " " + - File.bash_path(isabelle_app)) - } + val archive_name = isabelle_name + "_macos.tar.gz" + progress.echo("Packaging " + archive_name + " ...") + execute_tar(tmp_dir, + "-czf " + File.bash_path(release.dist_dir + Path.explode(archive_name)) + " " + + File.bash_path(isabelle_app)) + case Platform.Family.windows => File.write(isabelle_target + jedit_props, @@ -678,8 +647,8 @@ val website_platform_bundles = for { bundle_info <- bundle_infos - bundle <- bundle_info.names.find(name => (release.dist_dir + Path.explode(name)).is_file) - } yield (bundle, bundle_info) + if (release.dist_dir + bundle_info.path).is_file + } yield (bundle_info.name, bundle_info) val afp_link = HTML.link(AFP.repos_source + "/commits/" + afp_rev, HTML.text("AFP/" + afp_rev)) @@ -741,7 +710,6 @@ Command_Line.tool0 { var afp_rev = "" var components_base: Option[Path] = None - var remote_mac = "" var official_release = false var proper_release_name: Option[String] = None var website: Option[Path] = None @@ -758,7 +726,6 @@ Options are: -A REV corresponding AFP changeset id -C DIR base directory for Isabelle components (default: $ISABELLE_HOME_USER/../contrib) - -M USER@HOST remote Mac OS X for dmg build -O official release (not release-candidate) -R RELEASE proper release with name -W WEBSITE produce minimal website in given directory @@ -773,7 +740,6 @@ """, "A:" -> (arg => afp_rev = arg), "C:" -> (arg => components_base = Some(Path.explode(arg))), - "M:" -> (arg => remote_mac = arg), "O" -> (_ => official_release = true), "R:" -> (arg => proper_release_name = Some(arg)), "W:" -> (arg => website = Some(Path.explode(arg))), @@ -804,7 +770,7 @@ if (platform_families.isEmpty) default_platform_families else platform_families, more_components = more_components, build_library = build_library, - parallel_jobs = parallel_jobs, remote_mac = remote_mac) + parallel_jobs = parallel_jobs) } } } diff -r 10fc8a648250 -r d072f3287ffa src/Pure/Admin/isabelle_cronjob.scala --- a/src/Pure/Admin/isabelle_cronjob.scala Sat Dec 08 23:50:56 2018 +0100 +++ b/src/Pure/Admin/isabelle_cronjob.scala Sat Dec 08 23:53:43 2018 +0100 @@ -75,8 +75,7 @@ val build_release = Logger_Task("build_release", logger => { - Isabelle_Devel.release_snapshot(logger.options, - rev = get_rev(), afp_rev = get_afp_rev(), remote_mac = "macbroy30") + Isabelle_Devel.release_snapshot(logger.options, rev = get_rev(), afp_rev = get_afp_rev()) }) diff -r 10fc8a648250 -r d072f3287ffa src/Pure/Admin/isabelle_devel.scala --- a/src/Pure/Admin/isabelle_devel.scala Sat Dec 08 23:50:56 2018 +0100 +++ b/src/Pure/Admin/isabelle_devel.scala Sat Dec 08 23:53:43 2018 +0100 @@ -54,15 +54,14 @@ options: Options, rev: String = "", afp_rev: String = "", - parallel_jobs: Int = 1, - remote_mac: String = "") + parallel_jobs: Int = 1) { Isabelle_System.with_tmp_dir("isadist")(base_dir => { Isabelle_System.update_directory(root + Path.explode(RELEASE_SNAPSHOT), website_dir => Build_Release.build_release(base_dir, options, rev = rev, afp_rev = afp_rev, - parallel_jobs = parallel_jobs, remote_mac = remote_mac, website = Some(website_dir))) + parallel_jobs = parallel_jobs, website = Some(website_dir))) }) }