summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-12-01 17:09:00 +0100
committerHans Hagen <pragma@wxs.nl>2009-12-01 17:09:00 +0100
commit56ec51208255d316952705edd62cd88f8d90bf2c (patch)
treedbeb0c36e5a9606822674ca6d4b6996eebb9f5f3 /scripts
parent6f7cede47fa8d5d3dc7d27a1e39ce3182b1d6821 (diff)
downloadcontext-56ec51208255d316952705edd62cd88f8d90bf2c.tar.gz
beta 2009.12.01 17:09
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua64
-rwxr-xr-xscripts/context/stubs/mswin/context.exebin6143 -> 5631 bytes
-rwxr-xr-xscripts/context/stubs/mswin/luatools.exebin6143 -> 5631 bytes
-rwxr-xr-xscripts/context/stubs/mswin/metatex.exebin6143 -> 5631 bytes
-rw-r--r--scripts/context/stubs/mswin/mtxrun.dllbin8191 -> 7679 bytes
-rwxr-xr-xscripts/context/stubs/mswin/mtxrun.exebin6143 -> 5631 bytes
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua64
-rwxr-xr-xscripts/context/stubs/mswin/mtxworks.exebin6143 -> 5631 bytes
-rwxr-xr-xscripts/context/stubs/mswin/texexec.exebin6143 -> 5631 bytes
-rwxr-xr-xscripts/context/stubs/mswin/texmfstart.exebin6143 -> 5631 bytes
-rwxr-xr-xscripts/context/stubs/unix/mtxrun64
11 files changed, 189 insertions, 3 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 815d97235..8e2524147 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -10114,6 +10114,68 @@ end -- of closure
do -- create closure to overcome 200 locals limit
+if not modules then modules = { } end modules ['data-lua'] = {
+ version = 1.001,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- some loading stuff ... we might move this one to slot 2 depending
+-- on the developments (the loaders must not trigger kpse); we could
+-- of course use a more extensive lib path spec
+
+local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
+
+local gsub = string.gsub
+
+local libformats = { 'luatexlibs', 'tex', 'texmfscripts', 'othertextfiles' }
+local libpaths = file.split_path(package.path)
+
+package.loaders[2] = function(name) -- was [#package.loaders+1]
+--~ package.loaders[#package.loaders+1] = function(name) -- was
+ for i=1,#libformats do
+ local format = libformats[i]
+ local resolved = resolvers.find_file(name,format) or ""
+ if resolved ~= "" then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located via environment: '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ end
+ local simple = file.removesuffix(name)
+ for i=1,#libpaths do -- package.path, might become option
+ local resolved = gsub(libpaths[i],"?",simple)
+ if resolvers.isreadable.file(resolved) then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located via 'package.path': '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ end
+ -- just in case the distribution is messed up
+ local resolved = resolvers.find_file(file.basename(name),'luatexlibs') or ""
+ if resolved ~= "" then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located by basename via environment: '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ if trace_locating then
+ logs.report("fileio",'? unable to locate lib: %s',name)
+ end
+ return "unable to locate " .. name
+end
+
+resolvers.loadlualib = require
+
+
+end -- of closure
+
+do -- create closure to overcome 200 locals limit
+
if not modules then modules = { } end modules ['luat-kps'] = {
version = 1.001,
comment = "companion to luatools.lua",
@@ -10597,7 +10659,7 @@ own.libs = { -- todo: check which ones are really needed
-- 'data-bin.lua',
'data-zip.lua',
'data-crl.lua',
--- 'data-lua.lua',
+ 'data-lua.lua',
'data-kps.lua', -- so that we can replace kpsewhich
'data-aux.lua', -- updater
'data-tmf.lua', -- tree files
diff --git a/scripts/context/stubs/mswin/context.exe b/scripts/context/stubs/mswin/context.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/context.exe
+++ b/scripts/context/stubs/mswin/context.exe
Binary files differ
diff --git a/scripts/context/stubs/mswin/luatools.exe b/scripts/context/stubs/mswin/luatools.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/luatools.exe
+++ b/scripts/context/stubs/mswin/luatools.exe
Binary files differ
diff --git a/scripts/context/stubs/mswin/metatex.exe b/scripts/context/stubs/mswin/metatex.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/metatex.exe
+++ b/scripts/context/stubs/mswin/metatex.exe
Binary files differ
diff --git a/scripts/context/stubs/mswin/mtxrun.dll b/scripts/context/stubs/mswin/mtxrun.dll
index 12d38d5ca..4c4dfbf66 100644
--- a/scripts/context/stubs/mswin/mtxrun.dll
+++ b/scripts/context/stubs/mswin/mtxrun.dll
Binary files differ
diff --git a/scripts/context/stubs/mswin/mtxrun.exe b/scripts/context/stubs/mswin/mtxrun.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/mtxrun.exe
+++ b/scripts/context/stubs/mswin/mtxrun.exe
Binary files differ
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 815d97235..8e2524147 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -10114,6 +10114,68 @@ end -- of closure
do -- create closure to overcome 200 locals limit
+if not modules then modules = { } end modules ['data-lua'] = {
+ version = 1.001,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- some loading stuff ... we might move this one to slot 2 depending
+-- on the developments (the loaders must not trigger kpse); we could
+-- of course use a more extensive lib path spec
+
+local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
+
+local gsub = string.gsub
+
+local libformats = { 'luatexlibs', 'tex', 'texmfscripts', 'othertextfiles' }
+local libpaths = file.split_path(package.path)
+
+package.loaders[2] = function(name) -- was [#package.loaders+1]
+--~ package.loaders[#package.loaders+1] = function(name) -- was
+ for i=1,#libformats do
+ local format = libformats[i]
+ local resolved = resolvers.find_file(name,format) or ""
+ if resolved ~= "" then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located via environment: '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ end
+ local simple = file.removesuffix(name)
+ for i=1,#libpaths do -- package.path, might become option
+ local resolved = gsub(libpaths[i],"?",simple)
+ if resolvers.isreadable.file(resolved) then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located via 'package.path': '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ end
+ -- just in case the distribution is messed up
+ local resolved = resolvers.find_file(file.basename(name),'luatexlibs') or ""
+ if resolved ~= "" then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located by basename via environment: '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ if trace_locating then
+ logs.report("fileio",'? unable to locate lib: %s',name)
+ end
+ return "unable to locate " .. name
+end
+
+resolvers.loadlualib = require
+
+
+end -- of closure
+
+do -- create closure to overcome 200 locals limit
+
if not modules then modules = { } end modules ['luat-kps'] = {
version = 1.001,
comment = "companion to luatools.lua",
@@ -10597,7 +10659,7 @@ own.libs = { -- todo: check which ones are really needed
-- 'data-bin.lua',
'data-zip.lua',
'data-crl.lua',
--- 'data-lua.lua',
+ 'data-lua.lua',
'data-kps.lua', -- so that we can replace kpsewhich
'data-aux.lua', -- updater
'data-tmf.lua', -- tree files
diff --git a/scripts/context/stubs/mswin/mtxworks.exe b/scripts/context/stubs/mswin/mtxworks.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/mtxworks.exe
+++ b/scripts/context/stubs/mswin/mtxworks.exe
Binary files differ
diff --git a/scripts/context/stubs/mswin/texexec.exe b/scripts/context/stubs/mswin/texexec.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/texexec.exe
+++ b/scripts/context/stubs/mswin/texexec.exe
Binary files differ
diff --git a/scripts/context/stubs/mswin/texmfstart.exe b/scripts/context/stubs/mswin/texmfstart.exe
index a05675280..8f3ad2eea 100755
--- a/scripts/context/stubs/mswin/texmfstart.exe
+++ b/scripts/context/stubs/mswin/texmfstart.exe
Binary files differ
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 815d97235..8e2524147 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -10114,6 +10114,68 @@ end -- of closure
do -- create closure to overcome 200 locals limit
+if not modules then modules = { } end modules ['data-lua'] = {
+ version = 1.001,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- some loading stuff ... we might move this one to slot 2 depending
+-- on the developments (the loaders must not trigger kpse); we could
+-- of course use a more extensive lib path spec
+
+local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
+
+local gsub = string.gsub
+
+local libformats = { 'luatexlibs', 'tex', 'texmfscripts', 'othertextfiles' }
+local libpaths = file.split_path(package.path)
+
+package.loaders[2] = function(name) -- was [#package.loaders+1]
+--~ package.loaders[#package.loaders+1] = function(name) -- was
+ for i=1,#libformats do
+ local format = libformats[i]
+ local resolved = resolvers.find_file(name,format) or ""
+ if resolved ~= "" then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located via environment: '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ end
+ local simple = file.removesuffix(name)
+ for i=1,#libpaths do -- package.path, might become option
+ local resolved = gsub(libpaths[i],"?",simple)
+ if resolvers.isreadable.file(resolved) then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located via 'package.path': '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ end
+ -- just in case the distribution is messed up
+ local resolved = resolvers.find_file(file.basename(name),'luatexlibs') or ""
+ if resolved ~= "" then
+ if trace_locating then
+ logs.report("fileio","! lib '%s' located by basename via environment: '%s'",name,resolved)
+ end
+ return function() return dofile(resolved) end
+ end
+ if trace_locating then
+ logs.report("fileio",'? unable to locate lib: %s',name)
+ end
+ return "unable to locate " .. name
+end
+
+resolvers.loadlualib = require
+
+
+end -- of closure
+
+do -- create closure to overcome 200 locals limit
+
if not modules then modules = { } end modules ['luat-kps'] = {
version = 1.001,
comment = "companion to luatools.lua",
@@ -10597,7 +10659,7 @@ own.libs = { -- todo: check which ones are really needed
-- 'data-bin.lua',
'data-zip.lua',
'data-crl.lua',
--- 'data-lua.lua',
+ 'data-lua.lua',
'data-kps.lua', -- so that we can replace kpsewhich
'data-aux.lua', -- updater
'data-tmf.lua', -- tree files