summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-23 18:56:51 +0000
committerKarl Berry <karl@freefriends.org>2008-10-23 18:56:51 +0000
commita66a75d7e21afc71130e4d6aa3a216489d5b71b4 (patch)
tree2a3f073509dfacc079fd072c597bd0fc660cbbe5 /Master/install-tl
parent793463328b0427d81b7a4e71a674c60c5b1bbc89 (diff)
(-scheme): new command line option to conveniently
change the default installation scheme. Some wording changes. git-svn-id: svn://tug.org/texlive/trunk@11039 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl121
1 files changed, 74 insertions, 47 deletions
diff --git a/Master/install-tl b/Master/install-tl
index 769342b19e1..10c66ac819c 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -86,8 +86,6 @@ if (win32) {
));
}
-
-
use strict;
# debugging/logging cmd lines options:
@@ -139,17 +137,18 @@ our %vars=( # 'n_' means 'number of'.
# option handling
my $opt_from_dvd = "";
+my $opt_gui = 0;
+my $opt_help = 0;
my $opt_location = "";
-my $opt_profile = "";
-my $opt_profileseed = "";
-my $opt_no_cls=0;
-my $opt_nogui = 0;
+my $opt_no_gui = 0;
my $opt_nonadmin = 0;
-my $opt_arch = 0;
-our $opt_portable = 0;
-my $opt_help = 0;
+my $opt_portable = 0;
+my $opt_print_arch = 0;
+my $opt_profileseed = "";
+my $opt_profile = "";
+my $opt_scheme = "";
my $opt_version = 0;
-my $opt_gui = 0;
+
$opt_gui = 1 if (win32);
# default language for GUI installer
$::lang = "en";
@@ -169,24 +168,26 @@ if (-r "installation.profile") {
}
}
+
# first process verbosity/quiet options
process_logging_options();
# now the others
GetOptions(
- "from_dvd" => \$opt_from_dvd,
- "profile=s"=> \$opt_profile,
+ "fancyselector" => \$::alternative_selector,
+ "from_dvd" => \$opt_from_dvd,
+ "gui" => \$opt_gui,
+ "lang=s" => \$::opt_lang,
+ "location|url=s" => \$opt_location,
+ "no-cls", # $::opt_no_cls in install-menu-text-pl
+ "no-gui" => \$opt_no_gui,
+ "non-admin" => \$opt_nonadmin,
+ "portable" => \$opt_portable,
+ "print-arch" => \$opt_print_arch,
"profile-seed=s" => \$opt_profileseed,
- "no-cls",
- "gui", \$opt_gui,
- "no-gui", \$opt_nogui,
- "lang=s" => \$::opt_lang,
- "print-arch" => \$opt_arch,
- "portable" => \$opt_portable,
- "non-admin" => \$opt_nonadmin,
- "location|url=s" => \$opt_location,
- "fancyselector" => \$::alternative_selector,
- "version" => \$opt_version,
- "help|?" => \$opt_help) or pod2usage(1);
+ "profile=s" => \$opt_profile,
+ "scheme=s" => \$opt_scheme,
+ "version" => \$opt_version,
+ "help|?" => \$opt_help) or pod2usage(1);
if (win32()) {
pod2usage(-exitstatus => 0,
@@ -233,6 +234,7 @@ if ($opt_nonadmin and win32()) {
non_admin();
}
+
# the TLPDB instances we will use. $tlpdb is for the one from the installation
# media, while $localtlpdb is for the new installation
# $tlpdb must be our because it is used in install-menu-text.pl
@@ -252,7 +254,7 @@ my $media;
# a couple of special uses of install-tl:
-if ($opt_arch) {
+if ($opt_print_arch) {
print platform()."\n";
exit 0;
} elsif ($opt_portable) {
@@ -306,6 +308,7 @@ if ($opt_arch) {
exit 0;
}
+
# continuing with normal install
# initialize the correct platform
@@ -381,6 +384,20 @@ set_platforms_supported();
set_texlive_default_dirs();
initialize_collections();
set_install_platform();
+
+# initialize the scheme from the command line value, if given.
+if ($opt_scheme) {
+ # add the scheme- prefix if they didn't give it.
+ $opt_scheme = "scheme-$opt_scheme" if $opt_scheme !~ /^scheme-/;
+ my $scheme = $tlpdb->get_package($opt_scheme);
+ if (defined($scheme)) {
+ select_scheme($opt_scheme); # select it
+ } else {
+ tlwarn("Scheme $opt_scheme not defined, ignoring it.\n");
+ }
+}
+
+
if ($opt_profile eq "") {
if ($opt_profileseed) {
read_profile("$opt_profileseed");
@@ -401,7 +418,7 @@ if ($opt_profile eq "") {
our $MENU_ABORT = 1;
our $MENU_QUIT = 2;
our $MENU_ALREADYDONE = 3;
- if ($opt_gui && !$opt_nogui) {
+ if ($opt_gui && !$opt_no_gui) {
# try to load Tk.pm, but don't die if it doesn't work
eval { require Tk; };
if ($@) {
@@ -425,7 +442,7 @@ if ($opt_profile eq "") {
$opt_gui = 0;
}
}
- if ($opt_gui && !$opt_nogui) {
+ if ($opt_gui && !$opt_no_gui) {
require("installer/install-menu-perltk.pl");
} else {
require("installer/install-menu-text.pl");
@@ -450,7 +467,7 @@ if ($opt_profile eq "") {
exit(3);
}
} else {
- read_profile("$opt_profile");
+ read_profile($opt_profile);
}
if (!$finished) {
@@ -462,10 +479,11 @@ if (!$finished) {
do_installation();
}
-do_cleanup(); # closes the log file, so we say we're done before we are
+do_cleanup();
exit(0);
+
###################################################################
#
# FROM HERE ON ONLY SUBROUTINES
@@ -612,8 +630,8 @@ sub calc_depends {
# First look for packages in the selected scheme.
my $scheme=$tlpdb->get_package($vars{'selected_scheme'});
if (!defined($scheme)) {
+ die ("Scheme $vars{'selected_scheme'} not defined, vars:\n");
dump_vars(\*STDOUT);
- die ("Scheme $vars{'selected_scheme'} not defined!\n");
}
for my $scheme_content ($scheme->depends) {
@@ -662,7 +680,7 @@ sub calc_depends {
ddebug("pre_selected $p\n");
my $pkg = $tlpdb->get_package($p);
if (!defined($pkg)) {
- tlwarn("W: $p is mentioned somewhere but not available, disabling it!\n");
+ tlwarn("$p is mentioned somewhere but not available, disabling it.\n");
$install{$p} = 0;
next;
}
@@ -699,7 +717,7 @@ sub calc_depends {
foreach $p (keys %install) {
my $tlpobj = $tlpdb->get_package($p);
if (not(defined($tlpobj))) {
- tlwarn("W: $p should be installed but cannot be found in texlive.tlpdb, disabling it!\n");
+ tlwarn("$p should be installed but cannot be found in texlive.tlpdb, disabling it!\n");
$install{$p} = 0;
next;
}
@@ -735,7 +753,7 @@ sub load_tlpdb {
# scheme-minimal
if (!defined($tlpdb->get_package($default_scheme))) {
if (!defined($tlpdb->get_package("scheme-minimal"))) {
- die("Something is going seriously bad, cannot find nor $default_scheme nor scheme_minimal!");
+ die("Aborting, cannot find either $default_scheme or scheme_minimal");
}
$default_scheme = "scheme-minimal";
$vars{'selected_scheme'} = $default_scheme;
@@ -784,7 +802,7 @@ sub set_install_platform {
my $nowarn="";
my $wp='***'; # warning prefix
- $warn_nobin="\n$wp WARNING! No binaries for your platform found! ";
+ $warn_nobin="\n$wp WARNING: No binaries for your platform found. ";
$warn_nobin_x86_64_linux="$warn_nobin" .
"$wp No binaries for x86_64-linux found, using i386-linux instead.\n";
@@ -881,7 +899,7 @@ sub read_profile {
my $scheme=$tlpdb->get_package($vars{'selected_scheme'});
if (!defined($scheme)) {
dump_vars(\*STDOUT);
- die ("Scheme $vars{'selected_scheme'} not defined!\n");
+ die ("Scheme $vars{selected_scheme} not defined.\n");
}
for my $scheme_content ($scheme->depends) {
$vars{"$scheme_content"}=1 if ($scheme_content=~/^collection-/);
@@ -1226,7 +1244,6 @@ EOF
close(TMF) || warn "close($TMF) failed: $!";
}
-#
# do everything to select a scheme
#
sub select_scheme {
@@ -1282,11 +1299,11 @@ sub update_numbers {
sub flushlog {
my $fh;
if (open(LOG,">install-tl.log")) {
- warn "Writing log file to current working directory!\n";
+ warn "Writing log file to current working directory.\n";
$fh = \*LOG;
} else {
$fh = \*STDERR;
- warn "Not creating a log file but flushing messages to stderr:\n";
+ warn "Not creating a log file but flushing messages to stderr.\n";
}
foreach my $l (@::LOGLINES) {
@@ -1443,15 +1460,15 @@ services.)
(only for text mode installer) do not clear the screen when entering
a new menu (for debugging purposes).
+=item B<-non-admin>
+
+For Windows only: configure for the current user, not for all users.
+
=item B<-portable>
Start the installer for portable use---but use the C<tl-portable>
scripts instead of this option. See below for details.
-=item B<-non-admin>
-
-Windows: configure for the current user, not for all users.
-
=item B<-print-arch>
Print the detected arch-os combination and exit.
@@ -1471,12 +1488,22 @@ That follows from the logic of the installer that you first select a scheme
and then can change the actual collections being installed.
There is one exception to this: If the profile contains a variable for
-B<selected_scheme> and I<NO> collection variable is defined in the profile,
-then the collections which the specified scheme requires are installed.
-Thus, a simple line C<selected_scheme scheme-medium> together with the
-definitions of the paths (TEXDIR, TEXDIRW, TEXMFHOME, TEXMFLOCAL,
-TEXMFSYSCONFIG, TEXMFSYSVAR) suffice to install the medium scheme with all
-default options.
+B<selected_scheme> and I<no> collection variable is defined in the
+profile, then the collections which the specified scheme requires are
+installed. Thus, a simple line C<selected_scheme scheme-medium>
+together with the definitions of the paths (C<TEXDIR>, C<TEXDIRW>,
+C<TEXMFHOME>, C<TEXMFLOCAL>, C<TEXMFSYSCONFIG>, C<TEXMFSYSVAR>) suffices
+to install the medium scheme with all default options.
+
+=item B<-scheme> I<scheme>
+
+Schemes are the highest level of package grouping in TeX Live; the
+default is to use the C<full> scheme, which includes everything. This
+option overrides that default. You can change the scheme again before
+the actual installation with the usual menu. The I<scheme> argument may
+optionally have a prefix C<scheme->. The list of supported scheme names
+depends on what your installation location provides; see the interactive
+menu list.
=item B<-q>