texlive[50308] Master/texmf-dist/scripts/texlive: windows uninstaller
commits+siepo at tug.org
commits+siepo at tug.org
Sun Mar 10 12:46:56 CET 2019
Revision: 50308
http://tug.org/svn/texlive?view=revision&revision=50308
Author: siepo
Date: 2019-03-10 12:46:56 +0100 (Sun, 10 Mar 2019)
Log Message:
-----------
windows uninstaller no longer uses Perl/Tk
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/texlive/uninstall-win32.pl
Added Paths:
-----------
trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs
Modified: trunk/Master/texmf-dist/scripts/texlive/uninstall-win32.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/uninstall-win32.pl 2019-03-10 01:23:54 UTC (rev 50307)
+++ trunk/Master/texmf-dist/scripts/texlive/uninstall-win32.pl 2019-03-10 11:46:56 UTC (rev 50308)
@@ -18,32 +18,18 @@
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 $askfile = $0;
+$askfile =~ s!^(.*)([\\/])([^\\/]*)$!$1$2!;
+$askfile .= "uninstq.vbs";
+my $ans = system("wscript", $askfile);
+# 0 means yes
+if ($ans) {
+ exit(1);
+} else {
+ doit();
+}
-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");
-
sub doit {
# first we remove the whole bunch of shortcuts and menu entries
# by calling all the post action codes for the installed packages
@@ -81,8 +67,6 @@
TeXLive::TLWinGoo::update_assocs();
}
-Tk::MainLoop();
-
__END__
Added: trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs (rev 0)
+++ trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs 2019-03-10 11:46:56 UTC (rev 50308)
@@ -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
More information about the tex-live-commits
mailing list