summaryrefslogtreecommitdiff
path: root/Master/bin/win32
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2008-03-14 22:17:00 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2008-03-14 22:17:00 +0000
commitb38c2eef3f57421cc2f3d4a3e4c88e01b133f6a0 (patch)
tree30ce2589d6b68035c29aa24082b261b9e26de8fb /Master/bin/win32
parent122f6092f44728c5308a3efb16830e6f1f255bc1 (diff)
wrapper for thumbpdf.pl, mv ppower4 ppower4.texlua, add support for
-sys progs in Makefile.in, changed svn properties. git-svn-id: svn://tug.org/texlive/trunk@6969 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/win32')
-rwxr-xr-xMaster/bin/win32/ppower4.texlua6
-rwxr-xr-x[-rw-r--r--]Master/bin/win32/texdocc.exebin10752 -> 10752 bytes
-rwxr-xr-xMaster/bin/win32/thumbpdf.exebin7168 -> 0 bytes
-rwxr-xr-xMaster/bin/win32/thumbpdf.texlua90
4 files changed, 91 insertions, 5 deletions
diff --git a/Master/bin/win32/ppower4.texlua b/Master/bin/win32/ppower4.texlua
index 4d019b3c58e..06e6ff454ff 100755
--- a/Master/bin/win32/ppower4.texlua
+++ b/Master/bin/win32/ppower4.texlua
@@ -20,11 +20,7 @@ function fixwin(args_unix)
end
end
-if os.type == 'windows' then
- kpse.set_program_name('ppower4.texlua', 'ppower4')
-else
- kpse.set_program_name('ppower4')
-end
+kpse.set_program_name('ppower4.texlua', 'ppower4')
jarfile=kpse.find_file('pp4p.jar', 'texmfscripts')
diff --git a/Master/bin/win32/texdocc.exe b/Master/bin/win32/texdocc.exe
index f3ea9f1b28c..f3ea9f1b28c 100644..100755
--- a/Master/bin/win32/texdocc.exe
+++ b/Master/bin/win32/texdocc.exe
Binary files differ
diff --git a/Master/bin/win32/thumbpdf.exe b/Master/bin/win32/thumbpdf.exe
deleted file mode 100755
index 65199c54670..00000000000
--- a/Master/bin/win32/thumbpdf.exe
+++ /dev/null
Binary files differ
diff --git a/Master/bin/win32/thumbpdf.texlua b/Master/bin/win32/thumbpdf.texlua
new file mode 100755
index 00000000000..33a2d8cc1c4
--- /dev/null
+++ b/Master/bin/win32/thumbpdf.texlua
@@ -0,0 +1,90 @@
+#! /usr/bin/env texlua
+--*-Lua-*-
+-- $Id$
+
+-- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining.
+-- You may freely use, modify and/or distribute this file.
+
+-- Wrapper for scripts.
+
+function fixwin(args_unix)
+ if os.type == 'windows' then
+ local args_win={} -- new table
+ args_win[0]=args_unix[1]
+ for i=1, #args_unix do
+ args_win[i]='"'..args_unix[i]..'"'
+ end
+ return args_win
+ else
+ return args_unix
+ end
+end
+
+if string.find(arg[0], '/') then -- UNIX path
+ filename=select(1, string.gsub(arg[0], '.*/', ''))
+elseif string.find(arg[0], '\\') then -- Windows path
+ filename=select(1, string.gsub(arg[0], '.*\\', ''))
+else -- no path
+ filename=arg[0]
+end
+
+basename=select(1, string.gsub(filename, '\.texlua$', ''))
+
+sys=false
+
+if string.find(basename, '-sys$') then
+ basename=select(1, string.gsub(basename, '-sys$', ''))
+ sys=true
+end
+
+kpse.set_program_name(filename, basename)
+TEXDIR=kpse.var_value('SELFAUTOPARENT')
+BINDIR=kpse.var_value('SELFAUTOLOC')
+
+os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib')
+os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib')
+os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'..os.getenv('PATH'))
+
+if sys then
+ os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR'))
+ os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG'))
+ os.setenv('TEX_SYS_PROG', 'true')
+end
+
+if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then
+ command={BINDIR..'/'..basename..'.exe'}
+elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then
+ command={BINDIR..'/'..basename..'-bin.exe'}
+elseif lfs.isdir(BINDIR..'/'..basename..'.pl') then
+ perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe'
+ script=BINDIR..'/'..basename..'.pl'
+ command={perlbin, script}
+elseif kpse.find_file(basename..'.pl', 'texmfscripts') then
+ perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe'
+ script=kpse.find_file(basename..'.pl', 'texmfscripts')
+ command={perlbin, script}
+elseif kpse.find_file(basename..'.rb', 'texmfscripts') then
+ script=kpse.find_file(basename..'.rb', 'texmfscripts')
+ command={'ruby', script}
+elseif kpse.find_file(basename..'.py', 'texmfscripts') then
+ script=kpse.find_file(basename..'.py', 'texmfscripts')
+ command={'python', script}
+elseif kpse.find_file(basename..'.texlua', 'texmfscripts') then
+ script=kpse.find_file(basename..'.texlua', 'texmfscripts')
+ command={'texlua', script}
+elseif kpse.find_file(basename..'.lua', 'texmfscripts') then
+ script=kpse.find_file(basename..'.lua', 'texmfscripts')
+ command={'texlua', script}
+else
+ os.stderr:write(filename..'.texlua: No interpreter found for '..
+ basename..'\n')
+end
+
+for i=1, #arg do
+ command[#command+1]=arg[i]
+end
+
+command=fixwin(command)
+
+ret=os.spawn(command)
+os.exit(ret)