summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2008-02-26 22:41:18 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2008-02-26 22:41:18 +0000
commit3b8e15525b4f13d58666c9f711401dabb1bbe7f0 (patch)
tree90002aeb33ff9b92a0bb34c38a6a44d3c7367fdb /Master
parent994ed09222390f3206082e8f80b4a2c7d1ebd8c2 (diff)
Uninstaller for win32: simply remove all (pdf)tex directories from the path.
git-svn-id: svn://tug.org/texlive/trunk@6756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm17
-rw-r--r--Master/tlpkg/doc/wingoo-demo.pl21
-rwxr-xr-xMaster/tlpkg/installer/uninstall-try.pl4
3 files changed, 23 insertions, 19 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index 8a083cd7b6e..3f6cd3be3d4 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -60,7 +60,7 @@ BEGIN {
&get_system_path
&get_user_path
&add_texbindir_to_path
- &remove_texbindir_from_path
+ &remove_texbindirs_from_path
&register_script_type
&unregister_script_type
&broadcast_env
@@ -216,9 +216,9 @@ sub dir_writable {
my $written = 0;
$written = (print TEST "\n");
close TEST;
- # is it possible that writing fails silently?
- # anyhow, the test below won't hurt.
- return 0 unless -e $f;
+ # -s: non-zero size
+ # -e (exists) is not good enough
+ return 0 unless -s $f;
unlink $f;
return $written;
}
@@ -433,9 +433,8 @@ sub add_texbindir_to_path {
}
}
-sub remove_texbindir_from_path {
+sub remove_texbindirs_from_path {
$wg_error = 0; # clear error status
- $texbindir = shift;
my $system_env = get_system_env();
my $user_env = get_user_env();
@@ -451,7 +450,7 @@ sub remove_texbindir_from_path {
$d_exp = expand_string($d);
$d_exp =~ s/\\/\//g;
$d_exp =~ s/\/$//;
- push @newp, $d unless (uc($d_exp) eq uc($texbindir));
+ push @newp, $d unless is_a_texdir($d_exp);
}
$newp = join (';', @newp);
$newp =~ s/\//\\/g;
@@ -465,7 +464,7 @@ sub remove_texbindir_from_path {
$d_exp = expand_string($d);
$d_exp =~ s/\\/\//g;
$d_exp =~ s/\/$//;
- push @newp, $d unless (uc($d_exp) eq uc($texbindir));
+ push @newp, $d unless is_a_texdir($d_exp);
}
if (@newp) {
$newp = join(';', @newp);
@@ -695,6 +694,8 @@ sub update_assocs() {
} else {
tllog ($::LOG_DDEBUG, "No update_fu\n");
}
+ system( "RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True" )
+ unless admin();
}
=pod
diff --git a/Master/tlpkg/doc/wingoo-demo.pl b/Master/tlpkg/doc/wingoo-demo.pl
index 4be176de85a..c4be2193b3a 100644
--- a/Master/tlpkg/doc/wingoo-demo.pl
+++ b/Master/tlpkg/doc/wingoo-demo.pl
@@ -78,11 +78,13 @@ sub print_search_paths {
sub print_lua_out {
my $luatest = expand_string( $ENV{'TEMP'} ) . "/testlua";
- create_file( $luatest . ".texlua" );
+ my $luatestlua = $luatest . ".texlua";
+ unlink $luatestlua if -e $luatestlua;
+ create_file( $luatestlua );
my $cmd = 'set PATHEXT=%PATHEXT%;.TEXLUA & "'.$luatest.'"';
$cmd =~ s/\//\\/g;
print "Lua[tex] result: ".`$cmd`."\n";
- unlink $luatest.".texlua";
+ unlink $luatestlua;
}
sub print_assoc_cmd {
@@ -220,7 +222,7 @@ while (1) { # running this first as admin (if possible) and then as non-admin
# adding a filetype
print( "\nRegistering and unregistering filetypes\n" );
- my $testlua = admin() ? $luaprog : $::installerdir."/bin/win32/texlua.exe";
+ my $testlua = admin() ? $::installerdir."/bin/win32/texlua.exe" : $luaprog;
update_assocs(); # just to be sure
print_assoc_cmd( '.texlua' );
print_lua_out();
@@ -271,9 +273,10 @@ while (1) { # running this first as admin (if possible) and then as non-admin
if (!admin()) { last; }
}
-admin_again();
-unregister_script_type(".texlua");
-update_assocs();
-broadcast_env();
-print_assoc_cmd( '.texlua' );
-
+if ($real_admin) {
+ admin_again();
+ unregister_script_type(".texlua");
+ update_assocs();
+ broadcast_env();
+ print_assoc_cmd( '.texlua' );
+}
diff --git a/Master/tlpkg/installer/uninstall-try.pl b/Master/tlpkg/installer/uninstall-try.pl
index 00f68b6acc7..44d95fdab16 100755
--- a/Master/tlpkg/installer/uninstall-try.pl
+++ b/Master/tlpkg/installer/uninstall-try.pl
@@ -3,7 +3,7 @@
# $Id: uninstall-tl.pl 6381 2008-01-23 17:50:54Z preining $
# uninstall-tl.pl
#
-# Copyright 2008 Norbert Preining
+# Copyright 2008 Norbert Preining, Siep Kroonenberg
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -48,7 +48,7 @@ sub main
# remove any tex path and add an empty entry ... hope that does the
# right thing
#add_texbindir_to_path("");
- remove_texbindir_from_path("$Master/bin/win32");
+ remove_texbindirs_from_path();
unregister_script_type(".texlua");
broadcast_env();
update_assocs();