diff options
author | Norbert Preining <preining@logic.at> | 2011-06-01 02:13:32 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2011-06-01 02:13:32 +0000 |
commit | eb5c077c29de8c9aafee41f3c3857df3128d675d (patch) | |
tree | 522778582798893ed65f482c01b5251e3615f763 /Master/install-tl | |
parent | 283736b3e5d3f7112d5598324a4aa19406974c23 (diff) |
take over paper setting from previous version if possible
git-svn-id: svn://tug.org/texlive/trunk@22712 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/install-tl b/Master/install-tl index 286f9e9eb9d..b066354047e 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -57,6 +57,7 @@ use TeXLive::TLPOBJ; use TeXLive::TLPDB; use TeXLive::TLConfig; use TeXLive::TLDownload; +use TeXLive::TLPaper; if (win32) { require TeXLive::TLWinGoo; @@ -1640,6 +1641,53 @@ sub import_settings_from_old_tlpdb { ++$vars{'n_systems_available'} if ($key=~/^binary/); } } + # + # try to import paper settings + my $xdvi_paper; + if (!win32()) { + $xdvi_papers = TeXLive::TLPaper::get_paper("xdvi"); + } + my $pdftex_paper = TeXLive::TLPaper::get_paper("pdftex"); + my $dvips_paper = TeXLive::TLPaper::get_paper("dvips"); + my $dvipdfm_paper = TeXLive::TLPaper::get_paper("dvipdfm"); + my $dvipdfmx_paper = TeXLive::TLPaper::get_paper("dvipdfmx"); + my $context_paper; + if (defined($previoustlpdb->get_package("context"))) { + $context_paper = TeXLive::TLPaper::get_paper("context"); + } + my $common_paper = ""; + if (defined($xdvi_paper)) { + $common_paper = $xdvi_paper; + } + $common_paper = + ($common_paper ne $context_paper ? "no-agree-on-paper" : $common_paper) + if (defined($context_paper)); + $common_paper = + ($common_paper ne $pdftex_paper ? "no-agree-on-paper" : $common_paper) + if (defined($pdftex_paper)); + $common_paper = + ($common_paper ne $dvips_paper ? "no-agree-on-paper" : $common_paper) + if (defined($dvips_paper)); + $common_paper = + ($common_paper ne $dvipdfm_paper ? "no-agree-on-paper" : $common_paper) + if (defined($dvipdfm_paper)); + $common_paper = + ($common_paper ne $dvipdfmx_paper ? "no-agree-on-paper" : $common_paper) + if (defined($dvipdfmx_paper)); + if ($common_paper eq "no-agree-on-paper") { + tlwarn("Previous installation uses different paper settings.\n"); + tlwarn("You will need to select your preferred paper sizes manually.\n\n"); + } else { + if ($common_paper eq "letter") { + $vars{'option_letter'} = 1; + } elsif ($common_paper eq "a4") { + # do nothing + } else { + tlwarn("Previous installation has common paper setting of: $common_paper\n"); + tlwarn("After installation has finished, you will need\n"); + tlwarn(" to redo this setting by running:\n"); + } + } } # do everything to select a scheme |