diff options
author | Norbert Preining <preining@logic.at> | 2008-04-30 12:50:11 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-04-30 12:50:11 +0000 |
commit | dc41d3d3721be2fe57879c995a5a33217bf1c1b8 (patch) | |
tree | 620959f5b6f1c00b97a069b6d58bea163c31748d /Master | |
parent | 066212d6584e077613ce96a443ac57f09a404ae2 (diff) |
use TLPostInstall
git-svn-id: svn://tug.org/texlive/trunk@7739 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 109 |
1 files changed, 14 insertions, 95 deletions
diff --git a/Master/install-tl b/Master/install-tl index 8ddf9916663..e312a0223cb 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -6,12 +6,9 @@ # This file is licensed under the GNU General Public License version 2 # or any later version. # -# TODO: -# - fonts.conf adaption when bin-xetex is installed -# DONE here in install-tl, but should also be done -# in tl-package-manager.pl, or better in TLMedia.pm, so that after we -# have converted install-tl to use TLMedia we can collect post install -# stuff in one place only +# TODO +# - pod2usage on windows cannot be captured with | more or piped to a file +# why? I have no idea my $svnrev = '$Revision$'; $svnrev =~ m/: ([0-9]+) /; @@ -52,6 +49,7 @@ use TeXLive::TLUtils qw(initialize_installer media platform platform_desc use TeXLive::TLPOBJ; use TeXLive::TLPDB; use TeXLive::TLConfig; +use TeXLive::TLPostInstall; use Pod::Usage; use Cwd 'abs_path'; @@ -800,65 +798,6 @@ sub do_postinst_stuff { my $TEXMFSYSVAR="$vars{'TEXMFSYSVAR'}"; my $TEXMFLOCAL="$vars{'TEXMFLOCAL'}"; - # install some copies from texmf(-dist) into texmf-var - copy ("$TEXDIR/texmf-dist/tex/plain/config/language.def", - "$TEXMFSYSVAR/tex/plain/config") - if (-f "$TEXDIR/texmf-dist/tex/plain/config/language.def"); - copy ("$TEXDIR/texmf/xdvi/XDvi", - "$TEXMFSYSVAR/xdvi") - if (-f "$TEXDIR/texmf/xdvi/XDvi"); - - # those files must exist - copy ("$TEXDIR/texmf/dvips/config/config.ps", - "$TEXMFSYSVAR/dvips/config"); - - # now we have to fix up dvipdfm config file to contain the right - # piping command - mkdirhier("$TEXMFSYSVAR/dvipdfm/config"); - open(DVIPDFMCONFIGDIST, "<$TEXDIR/texmf/dvipdfm/config/config") - or die("Cannot open $TEXDIR/texmf/dvipdfm/config/config"); - open(DVIPDFMCONFIGINST, ">$TEXMFSYSVAR/dvipdfm/config/config") - or die("Cannot open $TEXMFSYSVAR/dvipdfm/config/config"); - while (<DVIPDFMCONFIGDIST>) { - if (m/^D /) { - print DVIPDFMCONFIGINST 'D "epstopdf --outfile=%o --nocompress %i"', "\n"; - } else { - print DVIPDFMCONFIGINST; - } - } - close(DVIPDFMCONFIGDIST); - close(DVIPDFMCONFIGINST); - #copy ("$TEXDIR/texmf/dvipdfm/config/config", - # "$TEXMFSYSVAR/dvipdfm/config"); - # - # dvipdfmx.cfg - open(DVIPDFMCONFIGDIST, "<$TEXDIR/texmf/dvipdfm/dvipdfmx.cfg") - or die("Cannot open $TEXDIR/texmf/dvipdfm/dvipdfmx.cfg"); - open(DVIPDFMCONFIGINST, ">$TEXMFSYSVAR/dvipdfm/dvipdfmx.cfg") - or die("Cannot open $TEXMFSYSVAR/dvipdfm/dvipdfmx.cfg"); - while (<DVIPDFMCONFIGDIST>) { - if (m/^D /) { - print DVIPDFMCONFIGINST "%$_"; - print DVIPDFMCONFIGINST "\n%% GhostScript (TeX Live (Unix and Win32)):\n"; - print DVIPDFMCONFIGINST 'D "rungs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dUseFlateCompression=true -sOutputFile=%o %i -c quit"', "\n\n"; - } else { - print DVIPDFMCONFIGINST; - } - } - close(DVIPDFMCONFIGDIST); - close(DVIPDFMCONFIGINST); - - copy ("$TEXDIR/texmf/web2c/mktex.cnf", - "$TEXMFSYSVAR/web2c"); - - # the old installer copied from CDDIR, but shouldn't this be installed - # in ANY case since it is in bin-pdftex??? - copy ("$TEXDIR/texmf/tex/generic/config/pdftexconfig.tex", - "$TEXMFSYSVAR/tex/generic/config"); - - # old installer did this, should we do this, TOO???? - #cp $CDDIR/texmf-dist/tex/context/config/cont-usr.tex $TEXMFSYSVAR/tex/context/config/cont-usr.tex - do_texmf_cnf() unless $opt_portable; @@ -919,6 +858,16 @@ sub do_postinst_stuff { $ENV{'PERL5LIB'}="$perl_libdir"; } + # + # post install actions + # + foreach my $package (sort keys %install) { + if ($install{$package} && defined($PostInstall{$package})) { + tllog($::LOG_NORMAL, "running post install action for $package\n"); + &{$PostInstall{$package}}($TEXDIR, $TEXMFSYSVAR, $TEXMFLOCAL); + } + } + # Step 4: run the programs @@ -952,36 +901,6 @@ sub do_postinst_stuff { tllog($::LOG_NORMAL, "re-running mktexlsr $TEXMFSYSVAR\n"); system('mktexlsr', "$TEXMFSYSVAR"); - # - # post install actions - # we don't have a general post install procedure for single packages - # so we collect the stuff here and also in TLMedia and as soon as - # installation has been moved to use TLMedia we can remove it from here - # - if ($install{'bin-xetex'}) { - # bin-xetex installs font-config related stuff - # we have to - # - updated the installation path in bin/win32/conf/fonts.conf - # - call fc-cache -v - if (-r "$TEXDIR/bin/win32/conf/fonts.conf") { - open(FONTSCONF, "<$TEXDIR/bin/win32/conf/fonts.conf") - or die("Cannot open $TEXDIR/bin/win32/conf/fonts.conf"); - my @lines = <FONTSCONF>; - close(FONTSCONF); - open(FONTSCONF, ">$TEXDIR/bin/win32/conf/fonts.conf") - or die("Cannot open $TEXDIR/bin/win32/conf/fonts.conf for writing"); - foreach (@lines) { - $_ =~ s!c:/Program Files/texlive/2008!$TEXDIR!; - print FONTSCONF; - } - close(FONTSCONF); - } - # call fc-cache but only when we install on win32! - if (win32()) { - system("fc-cache","-v"); - } - } - # now work through the options if specified at all # letter instead of a4 |