summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2019-03-10 11:46:56 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2019-03-10 11:46:56 +0000
commit0aff3f27af0d957e3e2f1a4c8475bdbfc77ad0f0 (patch)
tree338efa836a107e455aec23c5ea917179b6a9cade
parent6962188a7c62735631118a3506e96e6bdc260d88 (diff)
windows uninstaller no longer uses Perl/Tk
git-svn-id: svn://tug.org/texlive/trunk@50308 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/uninstall-win32.pl36
-rw-r--r--Master/texmf-dist/scripts/texlive/uninstq.vbs15
2 files changed, 25 insertions, 26 deletions
diff --git a/Master/texmf-dist/scripts/texlive/uninstall-win32.pl b/Master/texmf-dist/scripts/texlive/uninstall-win32.pl
index 6cf39b0230d..d82bd38184f 100755
--- a/Master/texmf-dist/scripts/texlive/uninstall-win32.pl
+++ b/Master/texmf-dist/scripts/texlive/uninstall-win32.pl
@@ -18,31 +18,17 @@ use TeXLive::TLPDB;
use TeXLive::TLPOBJ;
use TeXLive::TLConfig;
use TeXLive::TLUtils;
-use Tk;
-use Tk::Dialog;
-my $mw = MainWindow->new(-title => "remove tlmgr $TeXLive::TLConfig::ReleaseYear");
-
-my $f = $mw->Frame;
-my $lab = $f->Label(
-# -justify => 'left',
- -text => "Do you really want to remove TeX Live $TeXLive::TLConfig::ReleaseYear?");
-$lab->pack(-side => "left", -padx => "12", -pady => "6");
-
-$f->pack(# -padx => "10m",
- -pady => "12");
-
-my $ok = $f->Button(-text => "Ok",
- -command => sub { $mw->destroy; doit(); exit(0); });
-my $cancel = $f->Button(-text => "Cancel",
- -command => sub { $mw->destroy; exit(1); });
-
-$cancel->pack(-side => 'right' , -padx => "12");
-$ok->pack(-side => 'right', -padx => "12");
-
-$mw->Label(
- -text => "Please make sure that no TeX Live programs are still running!"
-)->pack(-padx => "12", -pady => "12");
+my $askfile = $0;
+$askfile =~ s!^(.*)([\\/])([^\\/]*)$!$1$2!;
+$askfile .= "uninstq.vbs";
+my $ans = system("wscript", $askfile);
+# 0 means yes
+if ($ans) {
+ exit(1);
+} else {
+ doit();
+}
sub doit {
# first we remove the whole bunch of shortcuts and menu entries
@@ -81,8 +67,6 @@ sub doit {
TeXLive::TLWinGoo::update_assocs();
}
-Tk::MainLoop();
-
__END__
diff --git a/Master/texmf-dist/scripts/texlive/uninstq.vbs b/Master/texmf-dist/scripts/texlive/uninstq.vbs
new file mode 100644
index 00000000000..7e768ac8223
--- /dev/null
+++ b/Master/texmf-dist/scripts/texlive/uninstq.vbs
@@ -0,0 +1,15 @@
+Dim ans
+ans = MsgBox( "Really uninstall TeX Live?", 36, "TeX Live uninstaller" )
+If ans <> vbYes Then
+ wscript.quit( 1 )
+Else
+ wscript.quit( 0 )
+End If
+
+' invocation from cmd.exe:
+' start /wait uninstq.vbs
+' test errorlevel
+
+' invocation from perl:
+' my $ans = system( "wscript", "uninstq.vbs" );
+' 0 means yes \ No newline at end of file