diff options
author | Piotr Strzelczyk <piotr@eps.gda.pl> | 2009-05-14 19:51:48 +0000 |
---|---|---|
committer | Piotr Strzelczyk <piotr@eps.gda.pl> | 2009-05-14 19:51:48 +0000 |
commit | 55d04ac2ee6793593b745e4e2ea0935a39f07ee6 (patch) | |
tree | 6ea8526a742509ead71900532b272fae6bd84e8c /Master | |
parent | 45bedb3177b9154e6f33b56b7dfb74f9eac5b558 (diff) |
switch dviout to .bat launcher; add bin dir to path in launcher
git-svn-id: svn://tug.org/texlive/trunk@13086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/bin/win32/dviout.bat | 7 | ||||
-rw-r--r-- | Master/bin/win32/dviout.vbs | 133 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/bin-dviout.win32.tlpsrc | 4 |
3 files changed, 7 insertions, 137 deletions
diff --git a/Master/bin/win32/dviout.bat b/Master/bin/win32/dviout.bat index ac5a76255fc..d09e13602f9 100755 --- a/Master/bin/win32/dviout.bat +++ b/Master/bin/win32/dviout.bat @@ -8,10 +8,13 @@ rem Make environment changes local rem Disable delayed expansion (makes processing bang ! char easier)
setlocal enableextensions disabledelayedexpansion
+rem Add bin dir to path; avoid trailing backslash
+for %%I in ("%~f0\..") do path %%~fI;%path%
+
rem Ask kpsewhich for TLROOT and TEXMFVAR
set tlroot=
for /f "tokens=1,2 delims=;" %%I in (
- '"%~dp0kpsewhich.exe" --expand-var "$SELFAUTOPARENT;$TEXMFVAR"'
+ 'kpsewhich --expand-var "$SELFAUTOPARENT;$TEXMFVAR"'
) do (
set tlroot=%%~sfI
set fontsdir=%%~fJ\fonts
@@ -22,7 +25,7 @@ if not exist "%fontsdir%\" goto :no_fontsdir rem Ask kpsewhich for TFM search path
for /f "delims=" %%I in (
- '"%~dp0kpsewhich.exe" --show-path tfm'
+ 'kpsewhich --show-path tfm'
) do (
set tfmpath=%%I
)
diff --git a/Master/bin/win32/dviout.vbs b/Master/bin/win32/dviout.vbs deleted file mode 100644 index 0d76d711211..00000000000 --- a/Master/bin/win32/dviout.vbs +++ /dev/null @@ -1,133 +0,0 @@ -' Call dviout with an optional dvi-file parameter
-' and font search configuration parameters.
-
-option explicit
-On Error Resume Next
-
-dim oWsh, oEnv, oFS, oArgs, oExec, sTmp, bFirst
-Dim sTL, oTL, sGS, sCmd, oTmp, i, s
-
-set oWsh = wscript.createobject( "wscript.Shell" )
-Set oArgs = wscript.Arguments
-Set oEnv = oWsh.Environment( "PROCESS" )
-Set oFS = CreateObject("Scripting.FileSystemObject")
-
-s = Left (wscript.version, 3)
-s = replace (s, ".", "")
-i = CInt(s)
-If i < 56 Then
- MsgBox "Need VBScript 5.6 or later. Aborting...", vbOKOnly+vbCritical, "Error"
- Wscript.Quit
-Else
- sTmp = ""
- ' ask kpathsea
- Set oExec = oWsh.Exec("kpsewhich -var-value=SELFAUTOPARENT")
- sTmp = oExec.StdOut.ReadLine
- Err.clear()
- If sTmp <> "" then
- sTL = replace(sTmp, "/", "\")
- End If
-End If
-If sTL = "" Then
- MsgBox "TeX Live not found; aborting...", vbOKOnly+vbCritical, "Error"
- wscript.quit
-End If
-If InStr(sTL, " ") <> 0 Then
- Set oTL = oFS.GetFolder(sTL)
- sTL = oTL.ShortPath
-End If
-
-'strip trailing "\"
-If Right(sTL,1) = "\" Then
- sTL = Left(sTL,Len(sTL)-1)
-End If
-
-' Ghostscript environment settings
-sGS = sTL & "\tlpkg\tlgs"
-oEnv("PATH") = sGS & "\bin;" & oEnv("PATH")
-oEnv("GS_LIB") = sGS & "\fonts;" & sGS & "\lib;" & sGS & "\Resource"
-
-sCmd = sTL & "\tlpkg\dviout\dviout.exe -TEXROOT="
-
-'add font trees to command-Line
-
-'first make sure %TEXMFVAR%\fonts exists
-sTmp = ""
-' ask kpathsea
-Set oExec = oWsh.Exec("kpsewhich -var-value=TEXMFVAR")
-sTmp = oExec.StdOut.ReadLine
-If Not oFS.FolderExists(sTmp) Then
- s = oFS.GetParentFolderName(sTmp)
- If Not oFS.FolderExists(s) Then
- Err.clear()
- oFS.CreateFolder(s)
- If Not oFS.FolderExists(s) Then
- MsgBox "No place to put bitmaps; aborting...", _
- vbOKOnly+vbCritical, "Error"
- wscript.quit
- End If
- End If
- oFS.CreateFolder(sTmp)
- If Not oFS.FolderExists(sTmp) Then
- MsgBox "No place to put bitmaps; aborting...", _
- vbOKOnly+vbCritical, "Error"
- wscript.quit
- End If
-End If
-If Not oFS.FolderExists(sTmp & "\fonts") Then
- Err.clear()
- oFS.CreateFolder(sTmp & "\fonts")
- If Not oFS.FolderExists(sTmp & "\fonts") Then
- MsgBox "No place to put bitmaps; aborting...", _
- vbOKOnly+vbCritical, "Error"
- wscript.quit
- End If
-End If
-
-
-Set oExec = oWsh.Exec("kpsewhich -show-path=tfm")
-sTmp = oExec.StdOut.ReadLine
-bFirst = True
-For Each s in Split(sTmp, ";", -1, 1)
- s = Trim(s)
- If s<>"." Then
- If InStr(s, "!!")=1 Then
- s = Mid(s, 3)
- End If
- i = InStr(s, "/fonts/tfm")
- If i<>0 then
- s = Mid(s, 1, i+5)
- Else
- s=""
- End If
- s = Trim(s)
- If s<>"" then
- s = replace(s, "/", "\")
- If oFS.FolderExists(s) Then
- If InStr(s," ")<>0 Then
- Set oTmp = oFS.GetFolder(s)
- s = oTmp.ShortPath
- End If
- If Not bFirst Then
- sCmd=sCmd & ";"
- Else
- bfirst=False
- End If
- sCmd = sCmd & s
- End If
- End If
- End If
-Next
-sCmd = sCmd & " -TEXPK=""^r\pk\\^s.^dpk;^r\tfm\\^s^tfm;" & _
- "^r\vf\\^s.vf;^r\ovf\\^s.ovf;^r\tfm\\^s.tfm"""
-
-' assume argument either short or already quoted
-If (oArgs.length > 0) Then
- For i = 0 To (oArgs.length - 1) Step 1
- sCmd = sCmd & " " & oArgs(i)
- Next
-End If
-
-' 2nd arg 1: normal window
-oWsh.run sCmd, 1
-'wscript.echo sCmd
\ No newline at end of file diff --git a/Master/tlpkg/tlpsrc/bin-dviout.win32.tlpsrc b/Master/tlpkg/tlpsrc/bin-dviout.win32.tlpsrc index 3f22ae46ce1..61c12a2eefb 100644 --- a/Master/tlpkg/tlpsrc/bin-dviout.win32.tlpsrc +++ b/Master/tlpkg/tlpsrc/bin-dviout.win32.tlpsrc @@ -1,5 +1,5 @@ name bin-dviout.win32 category TLCore binpattern d/win32 tlpkg/dviout -binpattern f bin/win32/dviout.vbs -postaction shortcut type=menu name="DVIOUT Dvi Viewer" cmd=wscript args=TEXDIR/bin/win32/dviout.vbs hide=1 +binpattern f bin/win32/dviout.bat +postaction shortcut type=menu name="DVIOUT Dvi Viewer" cmd=TEXDIR/bin/win32/dviout.bat hide=1 |