diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-01-13 12:30:29 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-01-13 12:30:29 +0000 |
commit | 26c58e8a4f8469a61092b4943e604dfaa58d2742 (patch) | |
tree | 973be7c4c25229a551f7ed56787ba6c041080fcb /Master/install-tl.pl | |
parent | d75011acae11da0327fbaf71cd13b29c433c7df6 (diff) |
Updated install-tl.pl to make use of TLWinGoo. Moved Norberts file
type code to TLWinGoo. It now only affects HKCU for non-admin users.
wingoo-demo.pl now also tests the file type code.
Commented out $ENV{'PERL5LIB'}=undef; in install-tl.pl l. 28 since
it is unnecessary and generates an undefined scalar value error.
git-svn-id: svn://tug.org/texlive/trunk@6209 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-x | Master/install-tl.pl | 111 |
1 files changed, 60 insertions, 51 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index 2cf3c60fc68..9be844a404d 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -27,7 +27,7 @@ BEGIN { # Perl executable. if ($^O=~/^MSWin(32|64)$/i) { - $ENV{'PERL5LIB'}=undef; + #$ENV{'PERL5LIB'}=undef; @INC="$::installerdir/tlpkg/lib/Perl5_lib-TL_inst"; } unshift (@INC, "$::installerdir/tlpkg"); @@ -41,6 +41,7 @@ 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; use strict; @@ -76,10 +77,10 @@ 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; +our $max_bins_on_CD=7; # for win dealing our $Registry; -# The global variable %vars is an associative list which contains all +# 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 %vars=( # 'n_' means 'number of'. @@ -342,7 +343,7 @@ sub set_platforms_supported { if ($trynet==1) { my @binaries=additional_architectures_available_from_net \%vars; for my $binary (@binaries) { - $vars{"netbin_$binary"}=0; + $vars{"netbin_$binary"}=0; } } for my $key (keys %vars) { @@ -362,10 +363,11 @@ sub set_texlive_default_dirs { my $texmfsysvar; my $texmflocal; my $texmfhome; - + $tex_prefix=getenv('TEXLIVE_INSTALL_PREFIX'); if (win32) { - require("TeXLive/win-admin.pl"); + #require("TeXLive/win-admin.pl"); + $vars{'win-admin'} = admin(); if ($vars{'win-admin'}) { $tex_prefix||=getenv('ProgramFiles') . '/texlive'; } else { @@ -400,7 +402,7 @@ sub calc_depends { %install=(); # initialize the %install hash with what should be installed - + # First look for packages in the selected scheme. my $scheme=$tlpdb->get_package($vars{'selected_scheme'}); @@ -469,7 +471,7 @@ sub calc_depends { # check for newly selected packages my @post_selected = keys %install; tllog($::LOG_DDEBUG, "number of post installations: $#post_selected\n"); - + # set repeat condition if ($#pre_selected != $#post_selected) { $changed = 1; @@ -490,7 +492,7 @@ sub calc_depends { $size += $tlpobj->binsize->{$a} if defined($tlpobj->binsize->{$a}); } } - $vars{'total_size'} = + $vars{'total_size'} = sprintf "%d", ($size * $TeXLive::TLConfig::BlockSize)/1024**2; } @@ -539,7 +541,7 @@ sub initialize_collections { sub set_install_platform { my @available_platforms; my $detected_platform=platform; - my $warn_nobin; + my $warn_nobin; my $warn_nobin_x86_64_linux; my $nowarn=""; my $wp='##'; # warning prefix @@ -581,7 +583,7 @@ sub create_profile { my $profilepath = shift; # The file "TLprofile" is created at the beginning of the # installation process and contains information about the current - # setup. The purpose is to allow non-interactive installations. + # setup. The purpose is to allow non-interactive installations. my $fh; if (ref($profilepath)) { $fh = $profilepath; @@ -654,8 +656,8 @@ sub do_install_packages { } install_packages($tlpdb,$localtlpdb,\@what,\@netarchs,$vars{'option_src'},$vars{'option_doc'}); } - -# do_postinst_stuff has to fix up the texmf tree and install some missing + +# do_postinst_stuff has to fix up the texmf tree and install some missing # files. The things to do are taken from the install-live.sh installer # of former times, and should be critically checked. sub do_postinst_stuff { @@ -664,7 +666,7 @@ sub do_postinst_stuff { "$vars{'TEXMFSYSVAR'}/tex/plain/config") if (-f "$vars{'TEXDIR'}/texmf-dist/tex/plain/config/language.def"); copy ("$vars{'TEXDIR'}/texmf/xdvi/XDvi", - "$vars{'TEXMFSYSVAR'}/xdvi") + "$vars{'TEXMFSYSVAR'}/xdvi") if (-f "$vars{'TEXDIR'}/texmf/xdvi/XDvi"); # those files must exist @@ -838,49 +840,56 @@ sub do_texmf_cnf { } # register texlua handlers etc etc +#sub do_win_registry_magic { +# # we are called under if (win32()) !! +# my $winpath = "$vars{'TEXDIR'}/bin/win32"; +# $winpath =~ s!/!\\!g; +# my $classespath; +# if ($vars{'win-admin'}) { +# # these things can only be done by admins +# # PATHEXT editing +# # should this be currentcontrolset or ControlSet001 ???? +# my $winenv = $Registry->Open( "LMachine/SYSTEM/CurrentControlSet/Control/Session Manager/Environment/", {Access=>'KEY_ALL_ACCESS',Delimiter=>"/"}); +# my $pathext = $winenv->GetValue("PATHEXT"); +# my $found = 0; +# foreach (split(/;/,$pathext)) { +# $found = 1 if (m/\.texlua/i); +# } +# if (!$found) { +# $winenv->SetValue("PATHEXT","$pathext;.texlua"); +# } +# +# # add the win32 dir to the PATH +# my $wpath = $winenv->GetValue("Path"); +# $wpath .= ";$winpath"; +# $winenv->SetValue("Path","$wpath", "REG_EXPAND_SZ"); +# +# # for the .texlua binding we can do it for admin and normal users +# # but with different registry pathes +# $classespath = "LMachine/Software/Classes/"; +# } else { +# tllog($::LOG_NORMAL, "non-admin users: no Path and PATHEXT setting possible.\n"); +# # for non-admin users the classes path is different +# # (Siep, email 2008-01-09) +# $classespath = "Users/Software/Classes/"; +# } +# # generate a .texlua association and link it to texlua.exe, which should +# # be in the path! +# my $classes = $Registry->Open( $classespath, {Access=>'KEY_ALL_ACCESS',Delimiter=>"/"}); +# $classes->CreateKey(".texlua")->SetValue("","script.texlua"); +# my $scriptkey = $classes->CreateKey("script.texlua"); +# $scriptkey->SetValue("", "TeXLua Script"); +# $scriptkey->CreateKey("Shell/Open/Command/")->SetValue("","$winpath\\texlua.exe %1 %*"); +#} + sub do_win_registry_magic { # we are called under if (win32()) !! my $winpath = "$vars{'TEXDIR'}/bin/win32"; $winpath =~ s!/!\\!g; - my $classespath; - if ($vars{'win-admin'}) { - # these things can only be done by admins - # PATHEXT editing - # should this be currentcontrolset or ControlSet001 ???? - my $winenv = $Registry->Open( "LMachine/SYSTEM/CurrentControlSet/Control/Session Manager/Environment/", {Access=>'KEY_ALL_ACCESS',Delimiter=>"/"}); - my $pathext = $winenv->GetValue("PATHEXT"); - my $found = 0; - foreach (split(/;/,$pathext)) { - $found = 1 if (m/\.texlua/i); - } - if (!$found) { - $winenv->SetValue("PATHEXT","$pathext;.texlua"); - } - - # add the win32 dir to the PATH - my $wpath = $winenv->GetValue("Path"); - $wpath .= ";$winpath"; - $winenv->SetValue("Path","$wpath", "REG_EXPAND_SZ"); - - # for the .texlua binding we can do it for admin and normal users - # but with different registry pathes - $classespath = "LMachine/Software/Classes/"; - } else { - tllog($::LOG_NORMAL, "non-admin users: no Path and PATHEXT setting possible.\n"); - # for non-admin users the classes path is different - # (Siep, email 2008-01-09) - $classespath = "Users/Software/Classes/"; - } - # generate a .texlua association and link it to texlua.exe, which should - # be in the path! - my $classes = $Registry->Open( $classespath, {Access=>'KEY_ALL_ACCESS',Delimiter=>"/"}); - $classes->CreateKey(".texlua")->SetValue("","script.texlua"); - my $scriptkey = $classes->CreateKey("script.texlua"); - $scriptkey->SetValue("", "TeXLua Script"); - $scriptkey->CreateKey("Shell/Open/Command/")->SetValue("","$winpath\\texlua.exe %1 %*"); + add_texbindir_to_path($winpath); + register_script_type(".texlua", $winpath."/texlua.exe"); } - # # do everything to select a scheme # |