updated linux_app-20191223: x86_64-linux;
authorwenzelm
Mon, 23 Dec 2019 15:24:14 +0100
changeset 71547 373dcdd363dc
parent 71546 e20c47795846
child 71548 05400628c56b
updated linux_app-20191223: x86_64-linux; clarified location of lib/scripts/Isabelle.run;
Admin/Linux/Isabelle.c
Admin/Linux/Isabelle.run
Admin/Linux/build
Admin/components/bundled-linux
Admin/components/components.sha1
src/Pure/Admin/build_release.scala
--- a/Admin/Linux/Isabelle.c	Sun Dec 22 16:19:57 2019 +0100
+++ b/Admin/Linux/Isabelle.c	Mon Dec 23 15:24:14 2019 +0100
@@ -8,6 +8,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <libgen.h>
 
 
 static void fail(const char *msg)
@@ -19,23 +20,25 @@
 
 int main(int argc, char *argv[])
 {
-  char **cmd_line = NULL;
+  char **cmd_line = NULL, *cmd = NULL, *dcmd = NULL, *bcmd = NULL, *dname = NULL, *bname = NULL;
   int i = 0;
 
+  dcmd = strdup(argv[0]); dname = dirname(dcmd);
+  bcmd = strdup(argv[0]); bname = basename(bcmd);
+
   cmd_line = malloc(sizeof(char *) * (argc + 1));
   if (cmd_line == NULL) fail("Failed to allocate command line");
 
-  cmd_line[0] = malloc(strlen(argv[0]) + 5);
-  if (cmd_line[0] == NULL) fail("Failed to allocate command line");
-
-  strcpy(cmd_line[0], argv[0]);
-  strcat(cmd_line[0], ".run");
+  cmd = cmd_line[0];
+  cmd = malloc(strlen(dname) + strlen(bname) + strlen("/lib/scripts/.run") + 1);
+  if (cmd == NULL) fail("Failed to allocate command name");
+  sprintf(cmd, "%s/lib/scripts/%s.run", dname, bname);
 
   for (i = 1; i < argc; i++) cmd_line[i] = argv[i];
 
   cmd_line[argc] = NULL;
 
-  execvp(cmd_line[0], cmd_line);
-  fail("Failed to execute application script");
+  execvp(cmd, cmd_line);
+  fprintf(stderr, "Failed to execute application script \"%s\"\n", cmd);
+  exit(2);
 }
-
--- a/Admin/Linux/Isabelle.run	Sun Dec 22 16:19:57 2019 +0100
+++ b/Admin/Linux/Isabelle.run	Mon Dec 23 15:24:14 2019 +0100
@@ -4,16 +4,9 @@
 #
 # Main Isabelle application script.
 
-# dereference executable
-if [ -L "$0" ]; then
-  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
-  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
-fi
-
-
 # minimal Isabelle environment
 
-ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; pwd)"
+ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)/../.."; pwd)"
 source "$ISABELLE_HOME/lib/scripts/isabelle-platform"
 
 
--- a/Admin/Linux/build	Sun Dec 22 16:19:57 2019 +0100
+++ b/Admin/Linux/build	Mon Dec 23 15:24:14 2019 +0100
@@ -1,4 +1,3 @@
 #!/usr/bin/env bash
 
-cc -static -m32 Isabelle.c -o Isabelle
-
+gcc -static -m64 -Wall Isabelle.c -o Isabelle
--- a/Admin/components/bundled-linux	Sun Dec 22 16:19:57 2019 +0100
+++ b/Admin/components/bundled-linux	Mon Dec 23 15:24:14 2019 +0100
@@ -1,2 +1,2 @@
 #additional components to be bundled for release
-linux_app-20131007
+linux_app-20191223
--- a/Admin/components/components.sha1	Sun Dec 22 16:19:57 2019 +0100
+++ b/Admin/components/components.sha1	Mon Dec 23 15:24:14 2019 +0100
@@ -173,6 +173,7 @@
 afb04f4048a87bb888fe7b05b0139cb060c7925b  kodkodi-1.5.2-1.tar.gz
 5f95c96bb99927f3a026050f85bd056f37a9189e  kodkodi-1.5.2.tar.gz
 377e36efb8608e6c828c7718d890e97fde2006a4  linux_app-20131007.tar.gz
+759848095e2ad506083d92b5646947e3c32f27a0  linux_app-20191223.tar.gz
 0aab4f73ff7f5e36f33276547e10897e1e56fb1d  macos_app-20130716.tar.gz
 ad5d0e640ce3609a885cecab645389a2204e03bb  macos_app-20150916.tar.gz
 400af57ec5cd51f96928d9de00d077524a6fe316  macos_app-20181205.tar.gz
--- a/src/Pure/Admin/build_release.scala	Sun Dec 22 16:19:57 2019 +0100
+++ b/src/Pure/Admin/build_release.scala	Mon Dec 23 15:24:14 2019 +0100
@@ -509,7 +509,8 @@
             File.write(isabelle_target + Path.explode(isabelle_name + ".options"),
               terminate_lines(java_options_title :: java_options))
 
-            val isabelle_run = isabelle_target + Path.explode(isabelle_name + ".run")
+            val isabelle_run =
+              isabelle_target + Path.explode("lib/scripts/" + isabelle_name + ".run")
             File.write(isabelle_run,
               File.read(Path.explode("~~/Admin/Linux/Isabelle.run"))
                 .replaceAllLiterally("{CLASSPATH}",