summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-extl.pl
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2018-07-06 19:55:45 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2018-07-06 19:55:45 +0000
commit31e134c4d702cf23f137574c0a2b421f02e0bc9e (patch)
treebd6ddab726311a50772b8550625254405dec4d7d /Master/tlpkg/installer/install-menu-extl.pl
parent6e0ef8475e8bdc664bd8bd158bd76d9d6bb5e5a4 (diff)
Added dialog for installation root and minor improvements
git-svn-id: svn://tug.org/texlive/trunk@48152 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/install-menu-extl.pl')
-rw-r--r--Master/tlpkg/installer/install-menu-extl.pl46
1 files changed, 29 insertions, 17 deletions
diff --git a/Master/tlpkg/installer/install-menu-extl.pl b/Master/tlpkg/installer/install-menu-extl.pl
index ece82c2c608..4961108b9e4 100644
--- a/Master/tlpkg/installer/install-menu-extl.pl
+++ b/Master/tlpkg/installer/install-menu-extl.pl
@@ -1,10 +1,11 @@
#!/usr/bin/env perl
-# install-menu-tcl.pl
+# install-menu-extl.pl
-# tell tcl about all configurable options
-# and terminate this output with an agreed-upon termination string.
-# tcl will read the package database itself. From this, it can deduce
-# collections, schemes and platforms, but not the names of platforms.
+# tell the frontend about all configurable options and terminate
+# this output with an agreed-upon termination string. the frontend
+# will read the package database itself. From this, it can deduce
+# collections, schemes and platforms, but not the names of
+# platforms.
# needed info:
@@ -13,7 +14,7 @@
# collections, probably per scheme
# maybe directories to be configured
-# current option values:
+# current options:
# paper size a4 | letter
# allow restricted toggle
@@ -23,19 +24,21 @@
# create symlinks | 2 aspects of desktop integration
# switch to online CTAN
-# then read the selected options back from tcl
+# then read the selected options back from the frontend
-# and finally, tee installer output to tcl to be tracked there
-# inside the log toplevel
+# when run_menu_extl reads 'startinst' from the frontend,
+# run_menu_extl returns to install-tl.
+# by then, the frontend has switched to non-blocking i/o
+# and will capture the output of the actual installation
+# inside a log window
-our %vars; # onlys contain simple scalars
-# from install-tl:
+our %vars; # only contains simple scalars
+# from install-tl:
# The global variable %vars is an associative list which contains all
# variables and their values which can be changed by the user.
# needs to be our since TeXLive::TLUtils uses it
-
our $opt_in_place;
our $tlpdb;
our @media_available;
@@ -99,7 +102,7 @@ sub print_vars {
print "endvars\n";
}
-# run_menu_tcl should be invoked by install-tl.
+# run_menu_extl should be invoked by install-tl.
sub run_menu_extl {
# make sure we have a value for total_size:
calc_depends();
@@ -121,13 +124,14 @@ sub run_menu_extl {
}
print "endbinaries\n";
- print "endmenudata\n"; # this triggers the tcl menu
+ print "endmenudata\n"; # this triggers the frontend menu
- # read input from install-tl-gui.tcl.
- # Three cases to consider:
+ # read input from frontend / install-tl-gui.tcl.
+ # Four cases to consider:
# 'calc': the frontend wants to update its ::vars array
# after some menu choices
- # 'startinst': done with choices, tell install-tl[-tcl] to
+ # 'checkdir': check whether $vars{TEXDIR} is creatable
+ # 'startinst': done with choices, tell install-tl to
# start installation
# 'quit': tell install-tl to clean up and quit
# read from frontend
@@ -154,6 +158,14 @@ sub run_menu_extl {
log("Illegal input '$l' from frontend");
return $MENU_ABORT;
}
+ } elsif ($l eq 'checkdir') {
+ my $td = <STDIN>;
+ chomp $td;
+ if (TeXLive::TLUtils::texdir_check($td)) {
+ print "1\n";
+ } else {
+ print "0\n";
+ }
} elsif ($l eq 'startinst') {
if (read_vars()) {
calc_depends();