texlive[71041] Master: vbscript -> powershell because of changes in

commits+siepo at tug.org commits+siepo at tug.org
Tue Apr 23 12:33:27 CEST 2024


Revision: 71041
          https://tug.org/svn/texlive?view=revision&revision=71041
Author:   siepo
Date:     2024-04-23 12:33:27 +0200 (Tue, 23 Apr 2024)
Log Message:
-----------
vbscript -> powershell because of changes in windows script support

Modified Paths:
--------------
    trunk/Master/bin/windows/runscript.tlu
    trunk/Master/texmf-dist/scripts/texlive/uninstall-windows.pl
    trunk/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/scripts/texlive/tl-errmess.ps1
    trunk/Master/texmf-dist/scripts/texlive/uninstq.ps1

Removed Paths:
-------------
    trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs
    trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs

Modified: trunk/Master/bin/windows/runscript.tlu
===================================================================
--- trunk/Master/bin/windows/runscript.tlu	2024-04-22 23:41:44 UTC (rev 71040)
+++ trunk/Master/bin/windows/runscript.tlu	2024-04-23 10:33:27 UTC (rev 71041)
@@ -287,14 +287,11 @@
   if guimode then
     local err_cmd
     os.setenv('RUNSCRIPT_ERROR_MESSAGE', msg)
-    local errmess_path = TEXDIR .. '/texmf-dist/scripts/texlive/tl-errmess.vbs'
-    local err_cmd = {"wscript", errmess_path:gsub('/','\\')}
+    local errmess_path = TEXDIR .. '/texmf-dist/scripts/texlive/tl-errmess.ps1'
+    local err_cmd = {"powershell", "-NoLogo", "-WindowStyle", "hidden",
+       '-ExecutionPolicy', 'Bypass', errmess_path:gsub('/','\\')}
     if lfs.isfile(errmess_path) then
       os.spawn(err_cmd)
-    elseif lfs.isfile(TEXDIR..'/tlpkg/tltcl/tclkit.exe') and
-        lfs.isfile(TEXDIR..'/tlpkg/tltcl/gui_err.tcl') then
-      os.spawn{TEXDIR..'/tlpkg/tltcl/tclkit.exe',
-          TEXDIR..'/tlpkg/tltcl/gui_err.tcl'}
     end
   else
     io.stderr:write(msg, '\n')

Added: trunk/Master/texmf-dist/scripts/texlive/tl-errmess.ps1
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tl-errmess.ps1	                        (rev 0)
+++ trunk/Master/texmf-dist/scripts/texlive/tl-errmess.ps1	2024-04-23 10:33:27 UTC (rev 71041)
@@ -0,0 +1,2 @@
+Add-Type -AssemblyName PresentationFramework
+[System.Windows.MessageBox]::Show($env:runscript_error_message, 'Error', 'OK', 'Warning')
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs	2024-04-22 23:41:44 UTC (rev 71040)
+++ trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs	2024-04-23 10:33:27 UTC (rev 71041)
@@ -1,7 +0,0 @@
-option explicit
-
-Dim wsh, envi
-
-Set wsh = wscript.CreateObject("wscript.shell")
-Set envi = wsh.environment("PROCESS")
-MsgBox envi("RUNSCRIPT_ERROR_MESSAGE"), vbcritical, "Error"
\ No newline at end of file

Modified: trunk/Master/texmf-dist/scripts/texlive/uninstall-windows.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/uninstall-windows.pl	2024-04-22 23:41:44 UTC (rev 71040)
+++ trunk/Master/texmf-dist/scripts/texlive/uninstall-windows.pl	2024-04-23 10:33:27 UTC (rev 71041)
@@ -26,9 +26,10 @@
 } else {
   my $askfile = $0;
   $askfile =~ s!^(.*)([\\/])([^\\/]*)$!$1$2!;
-  $askfile .= "uninstq.vbs";
-  $ans = system("wscript", $askfile);
-  # 0 means yes
+  $askfile .= "uninstq.ps1";
+  $ans = system("powershell", '-NoLogo', '-WindowStyle', 'hidden',
+       '-ExecutionPolicy', 'Bypass', $askfile);
+  # 0 means yes or ok
 }
 if ($ans) {
   exit(1);

Added: trunk/Master/texmf-dist/scripts/texlive/uninstq.ps1
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/uninstq.ps1	                        (rev 0)
+++ trunk/Master/texmf-dist/scripts/texlive/uninstq.ps1	2024-04-23 10:33:27 UTC (rev 71041)
@@ -0,0 +1,13 @@
+Add-Type -AssemblyName PresentationFramework
+
+$msg = @"
+Really uninstall TeX Live?
+
+Please make sure that no TeX Live programs are still running!
+"@
+$ans = [System.Windows.MessageBox]::Show($msg, 'Confirm uninstall', 'OKCancel', 'Question')
+if ($ans -eq 1) {
+  exit 0
+} else {
+  exit 1
+}
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs	2024-04-22 23:41:44 UTC (rev 71040)
+++ trunk/Master/texmf-dist/scripts/texlive/uninstq.vbs	2024-04-23 10:33:27 UTC (rev 71041)
@@ -1,17 +0,0 @@
-Dim ans
-ans = MsgBox( "Really uninstall TeX Live?" & vbcrlf & vbcrlf & _
-  "Please make sure that no TeX Live programs are still running!", _
-  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

Modified: trunk/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc	2024-04-22 23:41:44 UTC (rev 71040)
+++ trunk/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc	2024-04-23 10:33:27 UTC (rev 71041)
@@ -31,8 +31,8 @@
 runpattern f texmf-dist/scripts/texlive/tlmgr.pl
 runpattern f texmf-dist/scripts/texlive/tlmgrgui.pl
 runpattern f texmf-dist/scripts/texlive/uninstall-windows.pl
-runpattern f texmf-dist/scripts/texlive/uninstq.vbs
-runpattern f texmf-dist/scripts/texlive/tl-errmess.vbs
+runpattern f texmf-dist/scripts/texlive/uninstq.ps1
+runpattern f texmf-dist/scripts/texlive/tl-errmess.ps1
 #
 runpattern f tlpkg/installer/config.guess
 runpattern f tlpkg/installer/curl/curl-ca-bundle.crt



More information about the tex-live-commits mailing list.