summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2024-04-23 10:33:27 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2024-04-23 10:33:27 +0000
commit0368dbc0b4f02ec455bf93d6295c45d91a19af54 (patch)
tree3f9addaa1d1796f6a02e6c195ddc4ac89a22c57e
parentb20538ef47eb294e1334d029f756e48e0f42de52 (diff)
vbscript -> powershell because of changes in windows script support
git-svn-id: svn://tug.org/texlive/trunk@71041 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/bin/windows/runscript.tlu9
-rw-r--r--Master/texmf-dist/scripts/texlive/tl-errmess.ps12
-rw-r--r--Master/texmf-dist/scripts/texlive/tl-errmess.vbs7
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/uninstall-windows.pl7
-rw-r--r--Master/texmf-dist/scripts/texlive/uninstq.ps113
-rw-r--r--Master/texmf-dist/scripts/texlive/uninstq.vbs17
-rw-r--r--Master/tlpkg/tlpsrc/texlive.infra.tlpsrc4
7 files changed, 24 insertions, 35 deletions
diff --git a/Master/bin/windows/runscript.tlu b/Master/bin/windows/runscript.tlu
index 318dbabdcfb..c3f22c3bc88 100755
--- a/Master/bin/windows/runscript.tlu
+++ b/Master/bin/windows/runscript.tlu
@@ -287,14 +287,11 @@ local function show_error(msg)
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')
diff --git a/Master/texmf-dist/scripts/texlive/tl-errmess.ps1 b/Master/texmf-dist/scripts/texlive/tl-errmess.ps1
new file mode 100644
index 00000000000..1c086ec0248
--- /dev/null
+++ b/Master/texmf-dist/scripts/texlive/tl-errmess.ps1
@@ -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
diff --git a/Master/texmf-dist/scripts/texlive/tl-errmess.vbs b/Master/texmf-dist/scripts/texlive/tl-errmess.vbs
deleted file mode 100644
index 6212afc4181..00000000000
--- a/Master/texmf-dist/scripts/texlive/tl-errmess.vbs
+++ /dev/null
@@ -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
diff --git a/Master/texmf-dist/scripts/texlive/uninstall-windows.pl b/Master/texmf-dist/scripts/texlive/uninstall-windows.pl
index c194eda4b3b..e4a081387f3 100755
--- a/Master/texmf-dist/scripts/texlive/uninstall-windows.pl
+++ b/Master/texmf-dist/scripts/texlive/uninstall-windows.pl
@@ -26,9 +26,10 @@ if (@ARGV) {
} 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);
diff --git a/Master/texmf-dist/scripts/texlive/uninstq.ps1 b/Master/texmf-dist/scripts/texlive/uninstq.ps1
new file mode 100644
index 00000000000..27746b01077
--- /dev/null
+++ b/Master/texmf-dist/scripts/texlive/uninstq.ps1
@@ -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
diff --git a/Master/texmf-dist/scripts/texlive/uninstq.vbs b/Master/texmf-dist/scripts/texlive/uninstq.vbs
deleted file mode 100644
index 382f4be3731..00000000000
--- a/Master/texmf-dist/scripts/texlive/uninstq.vbs
+++ /dev/null
@@ -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
diff --git a/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc b/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc
index bdc8655ad08..b9cfa855c35 100644
--- a/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/texlive.infra.tlpsrc
@@ -31,8 +31,8 @@ runpattern f texmf-dist/scripts/texlive/mktexlsr
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