summaryrefslogtreecommitdiff
path: root/Master/install-tl.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-03-29 14:28:19 +0000
committerNorbert Preining <preining@logic.at>2008-03-29 14:28:19 +0000
commitd4eedbeb6301b3ed03a6b6f703020f7dc5dcdc63 (patch)
tree2e75e7be0a5c8389343b511710f59c3e87dd65d9 /Master/install-tl.pl
parent90c3bb4dc0c455df131af548a15d4cf875a86708 (diff)
too many changes, see email, basically tl.-package-manager work
git-svn-id: svn://tug.org/texlive/trunk@7221 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-xMaster/install-tl.pl164
1 files changed, 134 insertions, 30 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl
index 76ac273ad18..e3346f83310 100755
--- a/Master/install-tl.pl
+++ b/Master/install-tl.pl
@@ -49,7 +49,9 @@ use TeXLive::TLUtils qw(initialize_installer media platform platform_desc
install_packages dirname tllog);
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
-use TeXLive::TLConfig qw($DefaultContainerExtension $InfraLocation);
+use TeXLive::TLConfig;
+use Pod::Usage;
+use Cwd 'abs_path';
if (win32) {
require TeXLive::TLWinGoo;
@@ -92,12 +94,6 @@ my %install;
# if we should try to get additional binaries from the net
# needs our since for menu ...
our $trynet=0;
-# the url of net location, can be changed with -url ....
-#
-# for my own testing in the virtual machine
-#$::texlive_url = 'http://localhost/norbert/tltesting';
-#$::texlive_url = 'http://10.0.2.2/norbert/tltesting';
-$::texlive_url = 'ftp://tug.org/texlive/tlnet/tldev';
# the default scheme to be installed
my $default_scheme='scheme-full';
@@ -107,9 +103,6 @@ my $default_scheme='scheme-full';
our @collections_std;
our @collections_lang;
our @collections_lang_doc;
-# The maximum number of binary systems on the CD. This number must be
-# smaller than the number of binaries available from the network.
-our $max_bins_on_CD=7;
# for win dealing
#our $Registry;
# The global variable %vars is an associative list which contains all
@@ -146,9 +139,8 @@ my $opt_quiet = 0;
my $opt_qquiet = 0;
my $opt_arch = 0;
my $opt_portable = 0;
-
-$::netarchive = "tlpkg";
-$::diskarchive = "archive";
+my $opt_help = 0;
+my $opt_version = 0;
# default language for GUI installer
$::lang = "en";
@@ -157,9 +149,9 @@ GetOptions("media=s" => \$opt_media,
"profile=s"=> \$opt_profile,
"no-cls",
"gui", \$opt_gui,
- "netarchive=s" => \$::netarchive,
- "diskarchive=s" => \$::diskarchive,
- "lang=s" => \$::lang,
+ "netarchive=s" => \$NetArchive,
+ "diskarchive=s" => \$DiskArchive,
+ "lang=s" => \$::opt_lang,
"print-arch" => \$opt_arch,
"portable" => \$opt_portable,
"d" => \$opt_debug,
@@ -167,7 +159,24 @@ GetOptions("media=s" => \$opt_media,
"ddd" => \$opt_dddebug,
"q" => \$opt_quiet,
"qq" => \$opt_qquiet,
- "url=s" => \$opt_url ) or die("No pod doc till now!");
+ "url=s" => \$opt_url,
+ "version" => \$opt_version,
+ "help|?" => \$opt_help) or pod2usage(1);
+
+if (win32()) {
+ pod2usage(-exitstatus => 0, -verbose => 2, -noperldoc => 1) if $opt_help;
+} else {
+ pod2usage(-exitstatus => 0, -verbose => 2) if $opt_help;
+}
+
+if ($opt_version) {
+ print "TeX Live Cross Platform Installer, Revision $::installerrevision\n";
+ exit 0;
+}
+
+if (defined($::opt_lang)) {
+ $::lang = $::opt_lang;
+}
if ($opt_quiet) {
$::LOGLEVELTERMINAL = $::LOG_ZERO;
@@ -203,7 +212,7 @@ if ("$opt_profile" ne "") {
}
if ("$opt_url" ne "") {
- $::texlive_url = "$opt_url";
+ $TeXLiveURL = "$opt_url";
}
# the TLPDB instances we will use. $tlpdb is for the one from the installation
@@ -400,6 +409,7 @@ sub do_installation {
}
calc_depends();
prepare_installation();
+ save_options_into_tlpdb();
do_install_packages();
if (win32()) {
do_win_registry_magic();
@@ -408,7 +418,6 @@ sub do_installation {
&$h();
}
do_postinst_stuff();
- save_options_into_tlpdb();
$localtlpdb->save;
foreach my $h (@::end_install_hook) {
&$h();
@@ -467,13 +476,11 @@ sub set_texlive_default_dirs {
$tex_prefix=getenv('TEXLIVE_INSTALL_PREFIX');
if (win32) {
my $prog = getenv('ProgramFiles');
- $tex_prefix ||= $prog . '/texlive' if TeXLive::TLWinGoo::dir_writable($prog);
- $tex_prefix||=getenv('USERPROFILE') . '/texlive';
+ $tex_prefix ||= $prog . '/texlive';
+ # $tex_prefix ||= $prog . '/texlive' if TeXLive::TLWinGoo::dir_writable($prog);
+ # $tex_prefix||=getenv('USERPROFILE') . '/texlive';
} else {
$tex_prefix||='/usr/local/texlive';
- # $tex_prefix||='/usr/local/texlive' if (-w '/usr/local');
- # $tex_prefix||='/usr/local/texlive' if ( (-d '/usr/local/texlive') && (-w '/usr/local/texlive') );
- # $tex_prefix||=getenv('HOME') . '/texlive';
}
$vars{'TEXDIR'}="$tex_prefix/$texlive_release";
@@ -600,7 +607,7 @@ sub calc_depends {
sub load_tlpdb {
my $master;
if (media eq 'NET') {
- $master="$::texlive_url";
+ $master="$TeXLiveURL";
} else {
$master="$::installerdir";
}
@@ -766,23 +773,29 @@ sub save_options_into_tlpdb {
$tlp->name("00texlive-installation.config");
$tlp->category("TLCore");
my @deps;
+ push @deps, "platform/$::_platform_";
+ if ($::_media_ eq 'NET') {
+ push @deps, "location/$TeXLiveURL";
+ } else {
+ push @deps, "location/" . abs_path($::installerdir);
+ }
if ($vars{'option_letter'}) {
- push @deps, "option_letter";
+ push @deps, "letter";
}
if ($vars{'option_fmt'}) {
- push @deps, "option_fmt";
+ push @deps, "formats";
}
if ($vars{'option_symlinks'}) {
- push @deps, "option_symlinks";
+ push @deps, "symlinks";
push @deps, "sys_bin/$vars{'sys_bin'}";
push @deps, "sys_info/$vars{'sys_info'}";
push @deps, "sys_man/$vars{'sys_man'}";
}
if ($vars{'option_doc'}) {
- push @deps, "option_doc";
+ push @deps, "docfiles";
}
if ($vars{'option_src'}) {
- push @deps, "option_src";
+ push @deps, "srcfiles";
}
push @deps, "TEXDIR/$vars{'TEXDIR'}";
push @deps, "TEXMFSYSVAR/$vars{'TEXMFSYSVAR'}";
@@ -1100,6 +1113,97 @@ sub flushlog {
__END__
+=head1 NAME
+
+install-tl.pl - the TeX Live Cross Platform Installer
+
+=head1 SYNOPSIS
+
+install-tl.pl [OPTION] ...
+
+install-tl.bat [OPTION] ...
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-gui>
+
+Tries to load the GUI installer using Perl/Tk. If Perl/Tk is not
+available continue with the text mode installer.
+
+=item B<-lang> I<2-letter lang code>
+
+(only for GUI installer) tries to start the installer translated into
+the language specified by the 2-letter language code. Currently supported
+languages are English (en, default), Polish (pl), and German (de).
+
+=item B<-media> I<[CD|DVD|NET]>
+
+Overrides the autodetection of the media.
+
+=item B<-profile> I<profile>
+
+Preloads a TeX Live profile for equal installations on different systems.
+
+=item B<-url> I<url>
+
+Overrides the default URL for network installs. Should start with
+either ftp:// or http://
+
+=item B<-netarchive> I<dir>
+
+Overrides the default settings for netarchive. Should be used with care.
+
+=item B<-diskarchive> I<dir>
+
+Overrides the default settings for diskarchive. Should be used with care.
+
+=item B<-no-cls>
+
+(only for text mode installer) do not clear the screen when entering
+a new menu. For debugging purposes.
+
+=item B<-print-arch>
+
+Print the detected arch-os combination and exit.
+
+=item B<-portable>
+
+Starts the installer for portable use. See below for details.
+
+=item B<-d>, B<-dd>, B<-ddd>
+
+Debugging levels.
+
+=item B<-q>, B<-qq>
+
+B<-q> disables output to the terminal, while B<-qq> also disables output
+to the logfile.
+
+=item B<-help>, B<-h>, B<-?>
+
+print a help message.
+
+=back
+
+=head1 DESCRIPTION
+
+The TeX Live installer works across all supported platforms and allows
+to install TeX Live from various media including the network.
+
+=head1 PORTABLE USE
+
+To be written
+
+=head1 AUTHORS AND COPYRIGHT
+
+This script and its documentation were written for the TeX Live
+distribution (L<http://tug.org/texlive>) and both are licensed under the
+GNU General Public License Version 2 or later.
+
+=cut
+
### Local Variables:
### perl-indent-level: 2
### tab-width: 2