summaryrefslogtreecommitdiff
path: root/Master/install-tl-new
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2011-04-08 19:56:14 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2011-04-08 19:56:14 +0000
commitcf38fd8201cd87f139cd3e14bae445fe41a06abe (patch)
tree31c136c84882a44954b493a8e049bc2762bb5c95 /Master/install-tl-new
parent9631a619eb83ca16233a8c5a5d22b2549de79f6d (diff)
Portable: copy tlmenu.bat. Uncomment import_settings_from_old_tlpdb
git-svn-id: svn://tug.org/texlive/trunk@22024 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl-new')
-rwxr-xr-xMaster/install-tl-new218
1 files changed, 106 insertions, 112 deletions
diff --git a/Master/install-tl-new b/Master/install-tl-new
index 865d2c6cb93..b936a3dca76 100755
--- a/Master/install-tl-new
+++ b/Master/install-tl-new
@@ -632,8 +632,16 @@ sub do_installation {
exit 1;
}
# do the actual installation
- my $h;
- prepare_installation();
+ make_var_skeleton "$vars{'TEXMFSYSVAR'}";
+ make_local_skeleton "$vars{'TEXMFLOCAL'}";
+ mkdirhier "$vars{'TEXMFSYSCONFIG'}";
+
+ if ($vars{'in_place'}) {
+ $localtlpdb = $tlpdb;
+ } else {
+ $localtlpdb=new TeXLive::TLPDB;
+ $localtlpdb->root("$vars{'TEXDIR'}");
+ }
if (!$vars{'in_place'}) {
calc_depends();
save_options_into_tlpdb();
@@ -707,7 +715,7 @@ sub do_postinst_stuff {
# Step 1: Clean the environment.
%origenv = %ENV;
- my @TMFVARS0=qw(VARTEXFONTS
+ my @TMFVARS=qw(VARTEXFONTS
TEXMF SYSTEXMF VARTEXFONTS
TEXMFDBS WEB2C TEXINPUTS TEXFORMATS MFBASES MPMEMS TEXPOOL MFPOOL MPPOOL
PSHEADERS TEXFONTMAPS TEXPSHEADERS TEXCONFIG TEXMFCNF
@@ -720,7 +728,7 @@ You should know what you are doing.
We will remove that for the post install actions, but all further
operations might be disturbed.\n\n";
}
- foreach $tmv (@TMFVARS0) {
+ foreach $tmv (@TMFVARS) {
delete $ENV{$tmv} if (defined($ENV{$tmv}));
}
@@ -882,6 +890,8 @@ operations might be disturbed.\n\n";
# no need to test for portable or in_place:
# the menus (or profile?) should have set the required options
do_tlpdb_postactions();
+ copy("$::installerdir/tlpkg/installer/tlmenu.bat", $TEXDIR)
+ if $vars{'portable'};
}
@@ -1483,20 +1493,6 @@ sub sanitise_options {
$vars{'option_desktop_integration'} &&= !$vars{'portable'};
}
-sub prepare_installation {
- make_var_skeleton "$vars{'TEXMFSYSVAR'}";
- make_local_skeleton "$vars{'TEXMFLOCAL'}";
- mkdirhier "$vars{'TEXMFSYSCONFIG'}";
-
- if ($vars{'in_place'}) {
- $localtlpdb = $tlpdb;
- } else {
- $localtlpdb=new TeXLive::TLPDB;
- $localtlpdb->root("$vars{'TEXDIR'}");
- }
-}
-
-
sub do_install_packages {
my @what;
foreach my $package (sort keys %install) {
@@ -1554,100 +1550,98 @@ sub save_options_into_tlpdb {
$localtlpdb->save() unless $vars{'in_place'};
}
-# this seems not to be used anymore
-
-#sub import_settings_from_old_tlpdb {
-# my $dn = shift;
-# my $tlpdboldpath = "$dn/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName";
-# my $previoustlpdb;
-# if (-r $tlpdboldpath) {
-# # we found an old installation, so read that one in and save
-# # the list installed collections into an array.
-# info ("Trying to load old TeX Live Database,\n");
-# $previoustlpdb = TeXLive::TLPDB->new(root => $dn);
-# if ($previoustlpdb) {
-# info ("Importing settings from old installation in $dn\n");
-# } else {
-# tlwarn ("Cannot load old TLPDB, continuing with normal installation.\n");
-# return;
-# }
-# } else {
-# return;
-# }
-# # first import the collections
-# # since the scheme is not the final word we select scheme-custom here
-# # and then set the single collections by hand
-# $vars{'selected_scheme'} = "scheme-custom";
-# $vars{'n_collections_selected'} = 0;
-# # remove the selection of all collections
-# foreach my $entry (keys %vars) {
-# if ($entry=~/^(collection-.*)/) {
-# $vars{"$1"}=0;
-# }
-# }
-# for my $c ($previoustlpdb->collections) {
-# my $tlpobj = $tlpdb->get_package($c);
-# if ($tlpobj) {
-# $vars{$c} = 1;
-# ++$vars{'n_collections_selected'};
-# }
-# }
-# # now take over the path
-# my $oldroot = $previoustlpdb->root;
-# my $newroot = abs_path("$oldroot/..") . "/$texlive_release";
-# $vars{'TEXDIR'} = $newroot;
-# $vars{'TEXMFSYSVAR'} = "$newroot/texmf-var";
-# $vars{'TEXMFSYSCONFIG'} = "$newroot/texmf-config";
-# # only TEXMFLOCAL is treated differently, we use what is found by kpsewhich
-# # in 2008 and onward this is defined as
-# # TEXMFLOCAL = $SELFAUTOPARENT/../texmf-local
-# # so kpsewhich -var-value=TEXMFLOCAL returns
-# # ..../2008/../texmf-local
-# # TODO TODO TODO
-# chomp (my $tml = `kpsewhich -var-value=TEXMFLOCAL`);
-# $tml = abs_path($tml);
-# $vars{'TEXMFLOCAL'} = $tml;
-# #
-# # now for the settings
-# # set the defaults to what is specified in the tlpdb
-# $vars{'option_doc'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "install_docfiles");
-# $vars{'option_src'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "install_srcfiles");
-# $vars{'option_fmt'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "create_formats");
-# $vars{'option_desktop_integration'} = 1 if win32();
-# $vars{'option_path'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "path");
-# $vars{'option_path'} = 0 if !defined($vars{'option_path'});
-# $vars{'option_path'} = 1 if win32();
-# $vars{'option_sys_bin'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "sys_bin");
-# $vars{'option_sys_man'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "sys_man");
-# $vars{'sys_info'} =
-# $previoustlpdb->option_pkg("00texlive.installation",
-# "sys_info");
-# #
-# # import the set of selected architectures
-# my @aar = $previoustlpdb->setting_pkg("00texlive.installation",
-# "available_architectures");
-# if (@aar) {
-# for my $b ($tlpdb->available_architectures) {
-# $vars{"binary_$b"} = member( $b, @aar );
-# }
-# $vars{'n_systems_available'} = 0;
-# for my $key (keys %vars) {
-# ++$vars{'n_systems_available'} if ($key=~/^binary/);
-# }
-# }
-#}
+sub import_settings_from_old_tlpdb {
+ my $dn = shift;
+ my $tlpdboldpath = "$dn/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName";
+ my $previoustlpdb;
+ if (-r $tlpdboldpath) {
+ # we found an old installation, so read that one in and save
+ # the list installed collections into an array.
+ info ("Trying to load old TeX Live Database,\n");
+ $previoustlpdb = TeXLive::TLPDB->new(root => $dn);
+ if ($previoustlpdb) {
+ info ("Importing settings from old installation in $dn\n");
+ } else {
+ tlwarn ("Cannot load old TLPDB, continuing with normal installation.\n");
+ return;
+ }
+ } else {
+ return;
+ }
+ # first import the collections
+ # since the scheme is not the final word we select scheme-custom here
+ # and then set the single collections by hand
+ $vars{'selected_scheme'} = "scheme-custom";
+ $vars{'n_collections_selected'} = 0;
+ # remove the selection of all collections
+ foreach my $entry (keys %vars) {
+ if ($entry=~/^(collection-.*)/) {
+ $vars{"$1"}=0;
+ }
+ }
+ for my $c ($previoustlpdb->collections) {
+ my $tlpobj = $tlpdb->get_package($c);
+ if ($tlpobj) {
+ $vars{$c} = 1;
+ ++$vars{'n_collections_selected'};
+ }
+ }
+ # now take over the path
+ my $oldroot = $previoustlpdb->root;
+ my $newroot = abs_path("$oldroot/..") . "/$texlive_release";
+ $vars{'TEXDIR'} = $newroot;
+ $vars{'TEXMFSYSVAR'} = "$newroot/texmf-var";
+ $vars{'TEXMFSYSCONFIG'} = "$newroot/texmf-config";
+ # only TEXMFLOCAL is treated differently, we use what is found by kpsewhich
+ # in 2008 and onward this is defined as
+ # TEXMFLOCAL = $SELFAUTOPARENT/../texmf-local
+ # so kpsewhich -var-value=TEXMFLOCAL returns
+ # ..../2008/../texmf-local
+ # TODO TODO TODO
+ chomp (my $tml = `kpsewhich -var-value=TEXMFLOCAL`);
+ $tml = abs_path($tml);
+ $vars{'TEXMFLOCAL'} = $tml;
+ #
+ # now for the settings
+ # set the defaults to what is specified in the tlpdb
+ $vars{'option_doc'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "install_docfiles");
+ $vars{'option_src'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "install_srcfiles");
+ $vars{'option_fmt'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "create_formats");
+ $vars{'option_desktop_integration'} = 1 if win32();
+ $vars{'option_path'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "path");
+ $vars{'option_path'} = 0 if !defined($vars{'option_path'});
+ $vars{'option_path'} = 1 if win32();
+ $vars{'option_sys_bin'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "sys_bin");
+ $vars{'option_sys_man'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "sys_man");
+ $vars{'sys_info'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "sys_info");
+ #
+ # import the set of selected architectures
+ my @aar = $previoustlpdb->setting_pkg("00texlive.installation",
+ "available_architectures");
+ if (@aar) {
+ for my $b ($tlpdb->available_architectures) {
+ $vars{"binary_$b"} = member( $b, @aar );
+ }
+ $vars{'n_systems_available'} = 0;
+ for my $key (keys %vars) {
+ ++$vars{'n_systems_available'} if ($key=~/^binary/);
+ }
+ }
+}
# do everything to select a scheme
#