summaryrefslogtreecommitdiff
path: root/Master/install-tl.pl
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2008-03-13 23:28:54 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2008-03-13 23:28:54 +0000
commit597f8841cbe80679e58f82a35b6293c058c55f4c (patch)
treeaf10f2a44168c1ec45ff953f146627704bd5b4e9 /Master/install-tl.pl
parentb3800b347bc2a1009b4a215901db175f2b40e588 (diff)
installer: load system dependent stuff only if needed.
git-svn-id: svn://tug.org/texlive/trunk@6957 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-xMaster/install-tl.pl36
1 files changed, 8 insertions, 28 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl
index 7124a012f91..4835aaffb1a 100755
--- a/Master/install-tl.pl
+++ b/Master/install-tl.pl
@@ -35,7 +35,6 @@ BEGIN {
# Perl executable.
if ($^O=~/^MSWin(32|64)$/i) {
- #$ENV{'PERL5LIB'}=undef;
@INC="$::installerdir/tlpkg/installer/perllib";
}
unshift (@INC, "$::installerdir/tlpkg");
@@ -49,34 +48,12 @@ use TeXLive::TLUtils qw(initialize_installer media platform platform_desc
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
use TeXLive::TLConfig qw($DefaultContainerExtension $InfraLocation);
-use TeXLive::TLWinGoo;
-use Getopt::Long;
-$Getopt::Long::autoabbrev=0;
-use utf8;
-no utf8;
-# default language
-$::lang = "en";
-if ($^O =~ /^MSWin(32|64)$/i) {
- # trying to deduce automatically the country code
- my $foo = TeXLive::TLWinGoo::reg_country();
- if ($foo) {
- $::lang = $foo;
- } else {
- tllog($::LOG_DEBUG, "Didn't get any usuful code from reg_country: $foo...\n");
- }
-} else {
- # we load POSIX and locale stuff
- require POSIX;
- import POSIX qw/locale_h/;
- # now we try to deduce $::lang
- my $loc = setlocale(&POSIX::LC_CTYPE);
- my ($lang,$area,$codeset);
- if ($loc =~ m/^([^_.]*)(_([^.]*))?(\.([^@]*))?(@.*)?$/) {
- $lang = defined($1)?$1:"";
- }
- $::lang = $lang if ($lang);
+if (win32) {
+ require TeXLive::TLWinGoo;
}
+use Getopt::Long;
+$Getopt::Long::autoabbrev=0;
use strict;
@@ -154,6 +131,9 @@ my $opt_arch = 0;
$::netarchive = "tlpkg";
$::diskarchive = "archive";
+# default language for GUI installer
+$::lang = "en";
+
GetOptions("media=s" => \$opt_media,
"profile=s"=> \$opt_profile,
"no-cls",
@@ -167,7 +147,7 @@ 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 ) or die("No pod doc till now!");
if ($opt_quiet) {
$::LOGLEVELTERMINAL = $::LOG_ZERO;