summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLWinGoo.pm
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2008-06-08 21:03:34 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2008-06-08 21:03:34 +0000
commitbc133295dbbb37984c044e20bdb3b22c67771251 (patch)
treecee6ace2f758744da9b43af80c5947a3d5e27584 /Master/tlpkg/TeXLive/TLWinGoo.pm
parent140b6e1d7a8b6d16562c38927815d1591976191c (diff)
Support for real installation for running from dvd, non-gui install.
Added cachedir tag to fonts.conf. git-svn-id: svn://tug.org/texlive/trunk@8603 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLWinGoo.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm74
1 files changed, 33 insertions, 41 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index 4d2c48657c2..5107fe8c6c5 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -33,7 +33,6 @@ C<TeXLive::TLWinGoo> -- Additional utilities for Windows
TeXLive::TLWinGoo::admin;
TeXLive::TLWinGoo::non_admin;
TeXLive::TLWinGoo::reg_country;
- TeXLive::TLWinGoo::dir_writable($d);
=head2 ENVIRONMENT AND REGISTRY
@@ -89,7 +88,6 @@ BEGIN {
&admin
&non_admin
&reg_country
- &dir_writable
&expand_string
&global_tmpdir
&get_system_path
@@ -273,32 +271,6 @@ sub reg_country {
=pod
-=item C<dir_writable($d)>
-
-Tests whether its argument is writable by trying to write to
-it. This function is necessary because the built-in C<-w> test
-apparently doesn't work under Windows.
-
-=cut
-
-sub dir_writable {
- $d=shift;
- return 0 unless -d $d;
- $d =~ s!\\!/!g;
- $d =~ s!/$!!g;
- my $i = 0;
- while (-e $d . "/" . $i) { $i++; }
- my $f = $d."/".$i;
- my $fb = $f;
- $fb =~ s!/!\\!g;
- return 0 if
- system('copy /b ' . $ENV{'COMSPEC'} . ' "' . $fb . '" >nul 2>&1');
- unlink $f if -e $f;
- return 1;
-}
-
-=pod
-
=back
=head2 ENVIRONMENT AND REGISTRY
@@ -1010,49 +982,69 @@ the job.
=cut
sub create_uninstaller {
- my $tdfw = shift; # TEXDIR
+ my ($tdfw, $tdwfw, $tdsvfw, $tdscfw) = @_;
+ # TEXDIR, TEXDIRW, TEXMFSYSVAR, TEXMFSYSCONFIG
$tdfw =~ s![\\/]$!!;
my $td = $tdfw;
$td =~ s!/!\\!g;
+ $tdwfw =~ s![\\/]$!!;
+ my $tdw = $tdwfw;
+ $tdw =~ s!/!\\!g;
+
+ $tdsvfw =~ s![\\/]$!!;
+ my $tdsv = $tdsvfw;
+ $tdsv =~ s!/!\\!g;
+
+ $tdscfw =~ s![\\/]$!!;
+ my $tdsc = $tdscfw;
+ $tdsc =~ s!/!\\!g;
+
my $uninst_key = $Registry -> Open((admin() ? "LMachine" : "CUser") .
"/software/microsoft/windows/currentversion/",
{Access => KEY_ALL_ACCESS()});
my $k = $uninst_key->CreateKey("uninstall/TeXLive/");
$k->{"/DisplayName"} = "TeXLive ".$::texlive_release;
- $k->{"/UninstallString"} = "\"$td\\tlpkg\\installer\\uninst.bat\"";
+ $k->{"/UninstallString"} = "\"$tdw\\tlpkg\\installer\\uninst.bat\"";
$k->{'/DisplayVersion'} = $::texlive_release;
$k->{'/URLInfoAbout'} = "http://www.tug.org/texlive";
- open UNINST, ">$tdfw/tlpkg/installer/uninst.bat";
+ mkdirhier("$tdwfw/tlpkg/installer"); # wasn't this done yet?
+ open UNINST, ">$tdwfw/tlpkg/installer/uninst.bat";
print UNINST <<UNEND;
\@echo off
set PERL5LIB=
\"$td\\tlpkg\\tlperl\\bin\\perl.exe\" \"$td\\texmf\\scripts\\texlive\\uninstall-win32.pl\"
-call \"$td\\tlpkg\\installer\\unshort.bat\"
-copy \"$td\\tlpkg\\installer\\uninst2.bat\" \"\%TEMP\%\"
+call \"$tdw\\tlpkg\\installer\\unshort.bat\"
+copy \"$tdw\\tlpkg\\installer\\uninst2.bat\" \"\%TEMP\%\"
\"\%TEMP\%\\uninst2.bat\"
UNEND
+;
close UNINST;
- open UNINST2, ">$tdfw/tlpkg/installer/uninst2.bat";
- print UNINST2 <<UNEND2;
+ open UNINST2, ">$tdwfw/tlpkg/installer/uninst2.bat";
+ print UNINST2 <<UNEND2 if $td eq $tdw;
rmdir /s /q \"$td\\texmf-dist\"
rmdir /s /q \"$td\\texmf-doc\"
-rmdir /s /q \"$td\\texmf-var\"
-rmdir /s /q \"$td\\texmf-config\"
rmdir /s /q \"$td\\texmf\"
-rmdir /s /q \"$td\\temp\"
rmdir /s /q \"$td\\bin\"
rmdir /s /q \"$td\\tlpkg\"
-del \"$td\\install-tl.log\"
+UNEND2
+;
+ print UNINST2 <<UNEND2;
+rmdir /s /q \"$tdsv\"
+rmdir /s /q \"$tdsc\"
+rmdir /s /q \"$tdw\\temp\"
+rmdir /s /q \"$tdw\\tlpkg\"
+del \"$tdw\\install-tl.log\"
set test=
-for \%\%f in (\"$td\\*.*\") do \@set test=nonempty
-if x\%test\%==x rd \"$td\"
+for \%\%f in (\"$tdw\\*.*\") do \@set test=nonempty
+if x\%test\%==x rd \"$tdw\"
\@echo Done uninstalling TeXLive.
rem \@pause
del %0
UNEND2
+;
close UNINST2;
}