src/Pure/Admin/component_windows_app.scala
author wenzelm
Sun, 04 Feb 2024 23:05:35 +0100
changeset 79574 eace130baedc
parent 79572 fb6b448b7939
child 79577 1c63babf226e
permissions -rw-r--r--
proper target option, following package binutils-mingw-w64-x86-64 from Debian/Ubuntu;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
     1
/*  Title:      Pure/Admin/windows_app.scala
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 = {
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    14
    require(Platform.is_linux, "Linux platform required")
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(
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    37
    build_binutils: Boolean = false,
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    38
    launch4j_url: String = default_launch4j_url,
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    39
    binutils_url: String = default_binutils_url,
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    40
    sfx_url: String = default_sfx_url,
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    41
    progress: Progress = new Progress,
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    42
    target_dir: Path = Path.current
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    43
  ): Unit = {
79570
7254253f2ec7 more robust;
wenzelm
parents: 79569
diff changeset
    44
    Isabelle_System.require_command("7z", test = "")
7254253f2ec7 more robust;
wenzelm
parents: 79569
diff changeset
    45
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    46
    val platform_name = tool_platform()
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    47
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    48
    Isabelle_System.with_tmp_dir("build") { tmp_dir =>
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    49
      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
    50
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    51
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    52
      /* component */
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    53
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    54
      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
    55
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    56
      val platform_dir =
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    57
        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
    58
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    59
      val platform_bin_dir = platform_dir + Path.basic("bin")
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
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    62
      /* launch4j */
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    63
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    64
      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
    65
      Isabelle_System.extract(download_tar, platform_dir, strip = true)
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
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    68
      /* GNU binutils */
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    69
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    70
      if (build_binutils) {
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    71
        Isabelle_System.download_file(binutils_url, download_tar, progress = progress)
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    72
        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
    73
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    74
        progress.echo("Building GNU binutils for " + platform_name + " ...")
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    75
        val build_script =
79574
eace130baedc proper target option, following package binutils-mingw-w64-x86-64 from Debian/Ubuntu;
wenzelm
parents: 79572
diff changeset
    76
          List("""./configure --prefix="$PWD/target" --with-windres --with-ld --target=x86_64-w64-mingw32""",
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    77
            "make", "make install")
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    78
        Isabelle_System.bash(build_script.mkString(" && "), cwd = tmp_dir.file,
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    79
          progress_stdout = progress.echo(_, verbose = true),
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    80
          progress_stderr = progress.echo(_, verbose = true)).check
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    81
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    82
        for (name <- List("ld", "windres")) {
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    83
          Isabelle_System.copy_file(
79574
eace130baedc proper target option, following package binutils-mingw-w64-x86-64 from Debian/Ubuntu;
wenzelm
parents: 79572
diff changeset
    84
            tmp_dir + Path.explode("target/bin") + Path.basic("x86_64-w64-mingw32-" + name),
eace130baedc proper target option, following package binutils-mingw-w64-x86-64 from Debian/Ubuntu;
wenzelm
parents: 79572
diff changeset
    85
              platform_bin_dir + Path.basic(name))
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
    86
        }
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    87
      }
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    88
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    89
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    90
      /* 7zip sfx module */
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    91
79572
fb6b448b7939 proper sfx_archive_name;
wenzelm
parents: 79571
diff changeset
    92
      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
    93
79572
fb6b448b7939 proper sfx_archive_name;
wenzelm
parents: 79571
diff changeset
    94
      Isabelle_System.download_file(sfx_url,
fb6b448b7939 proper sfx_archive_name;
wenzelm
parents: 79571
diff changeset
    95
        tmp_dir + Path.basic(sfx_archive_name), progress = progress)
fb6b448b7939 proper sfx_archive_name;
wenzelm
parents: 79571
diff changeset
    96
      Isabelle_System.bash("7z x " + Bash.string(sfx_archive_name), cwd = tmp_dir.file).check
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    97
      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
    98
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
    99
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   100
      /* README */
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
      File.write(component_dir.README,
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   103
        """Auxiliary parts for Isabelle as Windows application
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
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   106
* Application launcher: http://launch4j.sourceforge.net
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
* Platform binaries "ld" and "windres" from GNU binutils:
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   109
  """ + binutils_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
* Self-extracting installer:
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   112
  """ + sfx_url + """
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
See also Isabelle/Admin/Windows/.
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   115
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
        Makarius
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   118
        """ + Date.Format.date(Date.now()) + "\n")
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
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   121
      /* component archive */
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   122
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   123
      val component_archive =
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   124
        Isabelle_System.make_directory(target_dir) +
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   125
          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
   126
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   127
      Isabelle_System.gnutar(
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   128
        "-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
   129
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   130
      progress.echo("Component archive " + component_archive)
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
  }
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
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   135
  /* Isabelle tool wrapper */
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   136
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   137
  val isabelle_tool =
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   138
    Isabelle_Tool("component_windows_app",
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   139
        "build windows_app component from GNU binutils and launch4j",
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   140
      Scala_Project.here,
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   141
      { args =>
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
   142
        var build_binutils = false
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   143
        var target_dir = Path.current
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   144
        var launch4j_url = default_launch4j_url
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   145
        var binutils_url = default_binutils_url
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   146
        var sfx_url = default_sfx_url
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   147
        var verbose = false
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   148
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   149
        val getopts = Getopts("""
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   150
Usage: isabelle component_windows_app [OPTIONS]
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   151
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   152
  Options are:
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
   153
    -B           build GNU binutils from sources
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   154
    -D DIR       target directory (default ".")
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   155
    -U URL       download URL for launch4j, default:
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   156
                 """ + default_launch4j_url + """
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   157
    -V URL       download URL for GNU binutils, default:
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   158
                 """ + default_binutils_url + """
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   159
    -W URL       download URL for 7zip sfx module, default:
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   160
                 """ + default_sfx_url + """
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   161
    -v           verbose
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   162
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   163
  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
   164
""",
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
   165
          "B" -> (_ => build_binutils = true),
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   166
          "D:" -> (arg => target_dir = Path.explode(arg)),
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   167
          "U:" -> (arg => launch4j_url = arg),
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   168
          "V:" -> (arg => binutils_url = arg),
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   169
          "W:" -> (arg => sfx_url = arg),
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   170
          "v" -> (_ => verbose = true))
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   171
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   172
        val more_args = getopts(args)
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   173
        if (more_args.nonEmpty) getopts.usage()
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
        val progress = new Console_Progress(verbose = verbose)
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   176
79571
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
   177
        build_windows_app(build_binutils = build_binutils,
d160d7a18b25 clarified options;
wenzelm
parents: 79570
diff changeset
   178
          launch4j_url = launch4j_url, binutils_url = binutils_url,
79569
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   179
          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
   180
      })
b5d199871f2f build Isabelle windows_app component from GNU binutils and launch4j;
wenzelm
parents:
diff changeset
   181
}