summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts/texlive/uninstall-win32.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/scripts/texlive/uninstall-win32.pl')
-rw-r--r--Master/texmf/scripts/texlive/uninstall-win32.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/uninstall-win32.pl b/Master/texmf/scripts/texlive/uninstall-win32.pl
index 8f14630f832..4c0e52bb7c9 100644
--- a/Master/texmf/scripts/texlive/uninstall-win32.pl
+++ b/Master/texmf/scripts/texlive/uninstall-win32.pl
@@ -17,6 +17,10 @@ BEGIN {
}
use TeXLive::TLWinGoo;
+use TeXLive::TLPDB;
+use TeXLive::TLPOBJ;
+use TeXLive::TLConfig;
+use TeXLive::TLUtils;
use Tk;
use Tk::Dialog;
@@ -39,6 +43,19 @@ $ok->pack(-side => 'left', -padx => "3m");
$cancel->pack(-side => 'left' , -padx => "3m");
sub doit {
+ # first we remove the whole bunch of shortcuts and menu entries
+ # by calling all the post action codes for the installed packages
+ my $localtlpdb = TeXLive::TLPDB->new ("root" => $Master);
+ if (!defined($localtlpdb)) {
+ tlwarn("Cannot load the TLPDB from $Master, are you sure there is an installation?\n");
+ } else {
+ for my $pkg ($localtlpdb->list_packages) {
+ &TeXLive::TLUtils::do_postaction("remove", $pkg);
+ }
+ }
+ my $menupath = &TeXLive::TLWinGoo::menu_path();
+ $menupath =~ s!/!\\!g;
+ `rmdir /s /q "$menupath\\$TeXLive::TLConfig::WindowsMainMenuName" 2>nul`;
remove_texbindirs_from_path();
unsetenv_reg("TEXBINDIR");
# from_dvd case: