diff options
author | Norbert Preining <preining@logic.at> | 2009-07-03 15:27:37 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-07-03 15:27:37 +0000 |
commit | 9167358afb2bd622448cf97615899cba00556bc5 (patch) | |
tree | 941e6c12cbc2bcfbc51f5097b67ac9e8d9ba7faf /Master/install-tl | |
parent | e14a9d60c5f2c2734d18d1d5e4f8464633ab9a60 (diff) |
the "Tokyo-Vienna-cramped-flight-commit":
- unify installer keys of the %vars hash to always use option_ prefix
if it is an option
- unify the layout of things in 00texlive.installation so that user settable
things look like opt_$key:vallue, and internal things setting_$key:vale
- add list of supported options to TLConfig, with type definitions
- use a unified option call
$tlpdb->option($key [, $value, $value])
instead of many different
$tlpdb->option_foo_bar
- adapt install-tl, uninstall-w32, tlmgr, tlpkg/bin, TeXLive::*, installer
plugins, to use this new function instead
- make the
setting_platform:XXXXX
(formerly platform:XXXXX) in 00texlive.installation only optional. It is
not saved into the TLPDB if the *default* platform as returned by
TeXLive::TLUtils::platform() (thus calling config.guess on unix). Only
if you override the platform in the installer with -force-arch then
this value is set in the TLPDB
- implement TLMedia->platform that checks first the included TLPDB for
option("platform"), and if that is not given determines the platform
using TLUtils::platform().
- move the add_symlinks and remove_symlinks from TLPDB to TLMedia
- sanatize the installer modules: perltk is now equivalent to text
- tlmgr:
. output of tlmgr option [show] does now show all the set options,
but ignores irrelevant ones for the respective platform
(sys_bin/man/info for win32, desktop_integration etc for unix)
. option handling rewritten in a general way so that we only have
to add new options to TLConfig::%TLPDBOptionXXXXX
. setting an option is verified against the types of the options
. implement
tlmgr option showall
that shows also options that are currently not set/saved in the TLPDB
- TLUtils: honor the w32_multi_user setting also for shortcuts and menu
items
- tlmgrgui:
. implement support for most options that are set in the TLPDB
. add buttons to remove/add symlinks
git-svn-id: svn://tug.org/texlive/trunk@14083 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 102 |
1 files changed, 47 insertions, 55 deletions
diff --git a/Master/install-tl b/Master/install-tl index de7daf156d4..7f70d6f9a7f 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -123,10 +123,10 @@ our @collections_lang_doc; # $tlpdb->option_XXXXX # settings (i.e., taken from tlpkg/tlpsrc/00texlive.installation.tlpsrc # -# 'option_symlinks' => 0, -# 'sys_bin' => '/usr/local/bin', -# 'sys_man' => '/usr/local/man', -# 'sys_info' => '/usr/local/info', +# 'option_path' => 0, +# 'option_sys_bin' => '/usr/local/bin', +# 'option_sys_man' => '/usr/local/man', +# 'option_sys_info' => '/usr/local/info', # 'option_doc' => 1, # 'option_src' => 1, # 'option_fmt' => 0, @@ -364,7 +364,7 @@ if ($location =~ m!^(ctan$|(http|ftp)://)!i) { $media = 'NET'; } } -info("Installing from: $location\n"); +info("Installing TeX Live $TeXLive::TLConfig::ReleaseYear from: $location\n"); if (defined($opt_force_arch)) { tlwarn("Overriding platform to $opt_force_arch\n"); @@ -1122,22 +1122,22 @@ sub load_tlpdb { die "$0: Could not load TeX Live Database from $master, goodbye.\n"; } # set the defaults to what is specified in the tlpdb - $vars{'option_doc'} = $tlpdb->option_install_docfiles; - $vars{'option_src'} = $tlpdb->option_install_srcfiles; - $vars{'option_fmt'} = $tlpdb->option_create_formats; - $vars{'option_letter'} = defined($tlpdb->option_paper) - && ($tlpdb->option_paper eq "letter" ? 1 : 0); - $vars{'option_desktop_integration'} = $tlpdb->option_desktop_integration; + $vars{'option_doc'} = $tlpdb->option("install_docfiles"); + $vars{'option_src'} = $tlpdb->option("install_srcfiles"); + $vars{'option_fmt'} = $tlpdb->option("create_formats"); + $vars{'option_letter'} = defined($tlpdb->option("paper")) + && ($tlpdb->option("paper") eq "letter" ? 1 : 0); + $vars{'option_desktop_integration'} = $tlpdb->option("desktop_integration"); $vars{'option_desktop_integration'} = 1 if win32(); - $vars{'option_path'} = $tlpdb->option_path; + $vars{'option_path'} = $tlpdb->option("path"); $vars{'option_path'} = 1 if win32(); - $vars{'option_w32_multi_user'} = $tlpdb->option_w32_multi_user; - $vars{'option_file_assocs'} = $tlpdb->option_file_assocs; + $vars{'option_w32_multi_user'} = $tlpdb->option("w32_multi_user"); + $vars{'option_file_assocs'} = $tlpdb->option("file_assocs"); # $vars{'option_file_assocs'} = 1 if win32(); - $vars{'option_post_code'} = $tlpdb->option_post_code; - $vars{'sys_bin'} = $tlpdb->option_sys_bin; - $vars{'sys_man'} = $tlpdb->option_sys_man; - $vars{'sys_info'} = $tlpdb->option_sys_info; + $vars{'option_post_code'} = $tlpdb->option("post_code"); + $vars{'option_sys_bin'} = $tlpdb->option("sys_bin"); + $vars{'option_sys_man'} = $tlpdb->option("sys_man"); + $vars{'option_sys_info'} = $tlpdb->option("sys_info"); # check that the default scheme is actually present, otherwise switch to # scheme-minimal @@ -1245,11 +1245,6 @@ sub create_profile { if $key=~/^collection/ and $vars{$key}==1; print $fh "$key $vars{$key}\n" if $key =~ /^option_/; print $fh "$key $vars{$key}\n" if (($key =~ /^binary_/) && $vars{$key}); - if ($vars{'option_desktop_integration'} && unix()) { - print $fh "sys_bin ", $vars{'sys_bin'}, "\n" if $key =~ /^sys_bin/; - print $fh "sys_man ", $vars{'sys_man'}, "\n" if $key =~ /^sys_man/; - print $fh "sys_info ", $vars{'sys_info'}, "\n" if $key =~ /^sys_info/; - } print $fh "$key $vars{$key}\n" if $key=~/^TEXDIR/; # includes TEXDIRW print $fh "$key $vars{$key}\n" if $key=~/^TEXMFSYSVAR/; print $fh "$key $vars{$key}\n" if $key=~/^TEXMFSYSCONFIG/; @@ -1339,20 +1334,17 @@ sub do_install_packages { # into the local tlpdb: # - should links be set, and if yes, the destination (bin,man,info) sub save_options_into_tlpdb { - $localtlpdb->option_platform($::_platform_); - $localtlpdb->option_location($location); - $localtlpdb->option_paper($vars{'option_letter'} ? "letter" : "a4"); - $localtlpdb->option_create_formats($vars{'option_fmt'} ? "1" : "0"); - $localtlpdb->option_desktop_integration($vars{'option_desktop_integration'} ? "1" : "0"); - $localtlpdb->option_file_assocs($vars{'option_file_assocs'} ? "1" : "0"); - $localtlpdb->option_path($vars{'option_path'} ? "1" : "0"); - $localtlpdb->option_post_code($vars{'option_post_code'} ? "1" : "0"); - $localtlpdb->option_w32_multi_user($vars{'option_w32_multi_user'} ? "1" : "0"); - $localtlpdb->option_sys_bin($vars{'sys_bin'}); - $localtlpdb->option_sys_info($vars{'sys_info'}); - $localtlpdb->option_sys_man($vars{'sys_man'}); - $localtlpdb->option_install_docfiles($vars{'option_doc'} ? "1" : "0"); - $localtlpdb->option_install_srcfiles($vars{'option_src'} ? "1" : "0"); + $localtlpdb->option ("location", $location); + $localtlpdb->option ("create_formats", $vars{'option_fmt'} ? "1" : "0"); + $localtlpdb->option ("desktop_integration", $vars{'option_desktop_integration'} ? "1" : "0"); + $localtlpdb->option ("file_assocs", $vars{'option_file_assocs'} ? "1" : "0"); + $localtlpdb->option ("post_code", $vars{'option_post_code'} ? "1" : "0"); + $localtlpdb->option ("sys_bin", $vars{'option_sys_bin'}); + $localtlpdb->option ("sys_info", $vars{'option_sys_info'}); + $localtlpdb->option ("sys_man", $vars{'option_sys_man'}); + $localtlpdb->option ("install_docfiles", $vars{'option_doc'} ? "1" : "0"); + $localtlpdb->option ("install_srcfiles", $vars{'option_src'} ? "1" : "0"); + $localtlpdb->option ("w32_multi_user", $vars{'option_w32_multi_user'} ? "1" : "0"); my @archs; foreach (keys %vars) { if (m/^binary_(.*)$/ ) { @@ -1362,7 +1354,12 @@ sub save_options_into_tlpdb { if ($opt_custom_bin) { push @archs, "custom"; } - $localtlpdb->option_available_architectures(@archs); + + # only if we forced the platform we do save this option into the tlpdb + if (defined($opt_force_arch)) { + $localtlpdb->setting ("platform", $::_platform_); + } + $localtlpdb->setting("available_architectures", @archs); $localtlpdb->save() unless $vars{'from_dvd'}; } @@ -1407,38 +1404,33 @@ sub import_settings_from_old_tlpdb { # set the defaults to what is specified in the tlpdb $vars{'option_doc'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_install_docfiles"); + "install_docfiles"); $vars{'option_src'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_install_srcfiles"); + "install_srcfiles"); $vars{'option_fmt'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_create_formats"); - my $tmp = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_paper"); - $vars{'option_letter'} = defined($tmp) && ($tmp eq "letter" ? 1 : 0); + "create_formats"); $vars{'option_desktop_integration'} = 1 if win32(); # option_path does not exist in older installation $vars{'option_path'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_create_symlinks"); + "create_symlinks"); $vars{'option_path'} = 1 if win32(); - $vars{'sys_bin'} = + $vars{'option_sys_bin'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_sys_bin"); - $vars{'sys_man'} = + "sys_bin"); + $vars{'option_sys_man'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_sys_man"); + "sys_man"); $vars{'sys_info'} = $previoustlpdb->option_pkg("00texlive-installation.config", - "opt_sys_info"); + "sys_info"); # # import the set of selected architectures - my $val = $previoustlpdb->option_pkg("00texlive-installation.config", - "available_architectures"); - my @aar; - if (defined($val)) { - @aar = split(" ", $val); + my @aar = $previoustlpdb->setting_pkg("00texlive-installation.config", + "available_architectures"); + if (@aar) { for my $b ($tlpdb->available_architectures) { $vars{"binary_$b"} = member( $b, @aar ); } |