more robust executable path specifications;
afford final test of Isabelle.init;
tuned;
--- a/Admin/Windows/Cygwin/isabelle/postinstall Tue Jul 16 12:31:08 2013 +0200
+++ b/Admin/Windows/Cygwin/isabelle/postinstall Tue Jul 16 13:23:37 2013 +0200
@@ -1,9 +1,14 @@
#!/bin/bash
-PATH=/bin
+export PATH=/bin
bash /etc/postinstall/base-files-mketc.sh.done
mkpasswd -l >/etc/passwd
mkgroup -l >/etc/group
+find -type d -exec chmod 755 '{}' +
+find -type f \( -name '*.exe' -o -name '*.dll' \) -exec chmod 755 '{}' +
+find -type f -not -name '*.exe' -not -name '*.dll' -exec chmod 644 '{}' +
+xargs -0 < contrib/cygwin/isabelle/executables chmod 755
+
--- a/Admin/Windows/Cygwin/isabelle/rebaseall Tue Jul 16 12:31:08 2013 +0200
+++ b/Admin/Windows/Cygwin/isabelle/rebaseall Tue Jul 16 13:23:37 2013 +0200
@@ -1,6 +1,6 @@
#!/bin/dash
-PATH=/bin
+export PATH=/bin
FILE_LIST="$(mktemp)"
--- a/Admin/lib/Tools/makedist_bundle Tue Jul 16 12:31:08 2013 +0200
+++ b/Admin/lib/Tools/makedist_bundle Tue Jul 16 13:23:37 2013 +0200
@@ -154,16 +154,6 @@
find . -type l -exec echo "{}" ";" -exec readlink "{}" ";" \
> "contrib/cygwin/isabelle/symlinks"
-
- cat >> "contrib/cygwin/isabelle/postinstall" <<EOF
-
-find -type d -exec chmod 755 '{}' +
-find -type f \( -name '*.exe' -o -name '*.dll' \) -exec chmod 755 '{}' +
-find -type f -not -name '*.exe' -not -name '*.dll' -exec chmod 644 '{}' +
-xargs -0 < contrib/cygwin/isabelle/executables chmod 755
-
-EOF
-
)
perl -pi -e "s,/bin/rebaseall.*,/isabelle/rebaseall,g;" \
--- a/src/Pure/System/cygwin_init.scala Tue Jul 16 12:31:08 2013 +0200
+++ b/src/Pure/System/cygwin_init.scala Tue Jul 16 13:23:37 2013 +0200
@@ -63,8 +63,8 @@
val text_area = new TextArea {
font = new Font("SansSerif", Font.PLAIN, GUI.resolution_scale(10) max 14)
editable = false
- columns = 80
- rows = 24
+ columns = 50
+ rows = 15
}
layout_panel.layout(new ScrollPane(text_area)) = BorderPanel.Position.Center
@@ -123,7 +123,27 @@
if (!(new JFile(cygwin_root)).isDirectory)
error("Bad Isabelle Cygwin directory: " + quote(cygwin_root))
- echo("Initializing Cygwin ...")
+ def execute(args: String*): Int =
+ {
+ val cwd = new JFile(isabelle_home)
+ val env = Map("CYGWIN" -> "nodosfilewarning")
+ val proc = Isabelle_System.raw_execute(cwd, env, true, args: _*)
+ proc.getOutputStream.close
+
+ val stdout = new BufferedReader(new InputStreamReader(proc.getInputStream, UTF8.charset))
+ try {
+ var line = stdout.readLine
+ while (line != null) {
+ echo(line)
+ line = stdout.readLine
+ }
+ }
+ finally { stdout.close }
+
+ proc.waitFor
+ }
+
+ echo("Initializing Cygwin:")
echo("symlinks ...")
val symlinks =
@@ -150,33 +170,16 @@
}
recover_symlinks(symlinks)
-
- val execute_cwd = new JFile(isabelle_home)
- val execute_env = Map("CYGWIN" -> "nodosfilewarning")
-
- def execute(args: String*): Int =
- {
- val proc = Isabelle_System.raw_execute(execute_cwd, execute_env, true, args: _*)
- proc.getOutputStream.close
-
- val stdout = new BufferedReader(new InputStreamReader(proc.getInputStream, UTF8.charset))
- try {
- var line = stdout.readLine
- while (line != null) {
- echo(line)
- line = stdout.readLine
- }
- }
- finally { stdout.close }
-
- proc.waitFor
- }
-
echo("rebaseall ...")
- execute("contrib\\cygwin\\bin\\dash", "/isabelle/rebaseall")
+ execute(cygwin_root + "\\bin\\dash.exe", "/isabelle/rebaseall")
echo("postinstall ...")
- execute("contrib\\cygwin\\bin\\bash", "/isabelle/postinstall")
+ execute(cygwin_root + "\\bin\\bash.exe", "/isabelle/postinstall")
+
+ echo("init ...")
+ System.setProperty("cygwin.root", cygwin_root)
+ Isabelle_System.init()
+ echo("OK")
}
}