summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl48
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