| author | nipkow | 
| Fri, 23 Aug 2024 18:40:12 +0200 | |
| changeset 80738 | 6adf6cc82013 | 
| parent 80224 | db92e0b6a11a | 
| child 82194 | 8141b302bb92 | 
| permissions | -rw-r--r-- | 
| 79874 | 1 | /* Title: Pure/Admin/component_windows_app.scala | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 2 | Author: Makarius | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 3 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 4 | Build Isabelle windows_app component from GNU binutils and launch4j. | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 5 | */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 6 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 7 | package isabelle | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 8 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 9 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 10 | object Component_Windows_App {
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 11 | /* resources */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 12 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 13 |   def tool_platform(): String = {
 | 
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 14 | require(Platform.is_unix, "Linux or macOS platform required") | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 15 | Isabelle_Platform.self.ISABELLE_PLATFORM64 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 16 | } | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 17 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 18 | def launch4j_jar(): Path = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 19 |     Path.explode("windows_app/" + tool_platform() + "/launch4j.jar")
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 20 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 21 | val sfx_name = "7zsd_All_x64.sfx" | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 22 |   val sfx_path: Path = Path.basic("windows_app") + Path.basic(sfx_name)
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 23 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 24 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 25 | /* build windows_app */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 26 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 27 | val default_launch4j_url = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 28 | "https://deac-riga.dl.sourceforge.net/project/launch4j/launch4j-3/3.50/launch4j-3.50-linux-x64.tgz" | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 29 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 30 | val default_binutils_url = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 31 | "https://ftp.gnu.org/gnu/binutils/binutils-2.26.1.tar.gz" | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 32 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 33 | val default_sfx_url = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 34 | "https://github.com/chrislake/7zsfxmm/releases/download/1.7.1.3901/7zsd_extra_171_3901.7z" | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 35 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 36 | def build_windows_app( | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 37 | launch4j_url: String = default_launch4j_url, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 38 | binutils_url: String = default_binutils_url, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 39 | sfx_url: String = default_sfx_url, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 40 | progress: Progress = new Progress, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 41 | target_dir: Path = Path.current | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 42 |   ): Unit = {
 | 
| 79570 | 43 |     Isabelle_System.require_command("7z", test = "")
 | 
| 44 | ||
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 45 | val platform_name = tool_platform() | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 46 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 47 |     Isabelle_System.with_tmp_dir("build") { tmp_dir =>
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 48 |       val download_tar = tmp_dir + Path.basic("download.tar.gz")
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 49 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 50 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 51 | /* component */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 52 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 53 |       val component_dir = Components.Directory(tmp_dir + Path.basic("windows_app")).create()
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 54 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 55 | val platform_dir = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 56 | Isabelle_System.make_directory(component_dir.path + Path.basic(platform_name)) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 57 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 58 |       val platform_bin_dir = platform_dir + Path.basic("bin")
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 59 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 60 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 61 | /* launch4j */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 62 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 63 | Isabelle_System.download_file(launch4j_url, download_tar, progress = progress) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 64 | Isabelle_System.extract(download_tar, platform_dir, strip = true) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 65 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 66 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 67 | /* GNU binutils */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 68 | |
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 69 | Isabelle_System.download_file(binutils_url, download_tar, progress = progress) | 
| 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 70 | Isabelle_System.extract(download_tar, tmp_dir, strip = true) | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 71 | |
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 72 |       progress.echo("Building GNU binutils for " + platform_name + " ...")
 | 
| 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 73 | val build_script = | 
| 79579 | 74 |         List("""./configure --prefix="$PWD/target" --target=x86_64-w64-mingw32""",
 | 
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 75 | "make", "make install") | 
| 80224 
db92e0b6a11a
clarified signature: prefer symbolic isabelle.Path over physical java.io.File;
 wenzelm parents: 
79874diff
changeset | 76 |       Isabelle_System.bash(build_script.mkString(" && "), cwd = tmp_dir,
 | 
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 77 | progress_stdout = progress.echo(_, verbose = true), | 
| 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 78 | progress_stderr = progress.echo(_, verbose = true)).check | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 79 | |
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 80 |       for (name <- List("ld", "windres")) {
 | 
| 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 81 | Isabelle_System.copy_file( | 
| 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 82 |           tmp_dir + Path.explode("target/bin") + Path.basic("x86_64-w64-mingw32-" + name),
 | 
| 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 83 | platform_bin_dir + Path.basic(name)) | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 84 | } | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 85 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 86 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 87 | /* 7zip sfx module */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 88 | |
| 79572 | 89 | val sfx_archive_name = Url.get_base_name(sfx_url).get | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 90 | |
| 79572 | 91 | Isabelle_System.download_file(sfx_url, | 
| 92 | tmp_dir + Path.basic(sfx_archive_name), progress = progress) | |
| 80224 
db92e0b6a11a
clarified signature: prefer symbolic isabelle.Path over physical java.io.File;
 wenzelm parents: 
79874diff
changeset | 93 |       Isabelle_System.bash("7z x " + Bash.string(sfx_archive_name), cwd = tmp_dir).check
 | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 94 | Isabelle_System.copy_file(tmp_dir + Path.basic(sfx_name), component_dir.path) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 95 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 96 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 97 | /* README */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 98 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 99 | File.write(component_dir.README, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 100 | """Auxiliary parts for Isabelle as Windows application | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 101 | =================================================== | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 102 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 103 | * Application launcher: http://launch4j.sourceforge.net | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 104 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 105 | * Platform binaries "ld" and "windres" from GNU binutils: | 
| 79578 | 106 |   """ + binutils_url + build_script.mkString("\n\n    ", "\n    ", "") + """
 | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 107 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 108 | * Self-extracting installer: | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 109 | """ + sfx_url + """ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 110 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 111 | See also Isabelle/Admin/Windows/. | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 112 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 113 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 114 | Makarius | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 115 | """ + Date.Format.date(Date.now()) + "\n") | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 116 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 117 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 118 | /* component archive */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 119 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 120 | val component_archive = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 121 | Isabelle_System.make_directory(target_dir) + | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 122 |           Path.basic("windows_app-" + Date.Format.alt_date(Date.now())).tar.gz
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 123 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 124 | Isabelle_System.gnutar( | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 125 | "-czf " + File.bash_path(component_archive) + " windows_app", dir = tmp_dir).check | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 126 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 127 |       progress.echo("Component archive " + component_archive)
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 128 | } | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 129 | } | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 130 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 131 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 132 | /* Isabelle tool wrapper */ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 133 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 134 | val isabelle_tool = | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 135 |     Isabelle_Tool("component_windows_app",
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 136 | "build windows_app component from GNU binutils and launch4j", | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 137 | Scala_Project.here, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 138 |       { args =>
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 139 | var target_dir = Path.current | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 140 | var launch4j_url = default_launch4j_url | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 141 | var binutils_url = default_binutils_url | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 142 | var sfx_url = default_sfx_url | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 143 | var verbose = false | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 144 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 145 |         val getopts = Getopts("""
 | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 146 | Usage: isabelle component_windows_app [OPTIONS] | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 147 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 148 | Options are: | 
| 79571 | 149 | -B build GNU binutils from sources | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 150 | -D DIR target directory (default ".") | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 151 | -U URL download URL for launch4j, default: | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 152 | """ + default_launch4j_url + """ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 153 | -V URL download URL for GNU binutils, default: | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 154 | """ + default_binutils_url + """ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 155 | -W URL download URL for 7zip sfx module, default: | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 156 | """ + default_sfx_url + """ | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 157 | -v verbose | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 158 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 159 | Build Isabelle windows_app component from GNU binutils and launch4j. | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 160 | """, | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 161 | "D:" -> (arg => target_dir = Path.explode(arg)), | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 162 | "U:" -> (arg => launch4j_url = arg), | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 163 | "V:" -> (arg => binutils_url = arg), | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 164 | "W:" -> (arg => sfx_url = arg), | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 165 | "v" -> (_ => verbose = true)) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 166 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 167 | val more_args = getopts(args) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 168 | if (more_args.nonEmpty) getopts.usage() | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 169 | |
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 170 | val progress = new Console_Progress(verbose = verbose) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 171 | |
| 79577 
1c63babf226e
uniform build of binutils for linux, linux_arm, macos;
 wenzelm parents: 
79574diff
changeset | 172 | build_windows_app(launch4j_url = launch4j_url, binutils_url = binutils_url, | 
| 79569 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 173 | sfx_url = sfx_url, progress = progress, target_dir = target_dir) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 174 | }) | 
| 
b5d199871f2f
build Isabelle windows_app component from GNU binutils and launch4j;
 wenzelm parents: diff
changeset | 175 | } |