context.lus /size: 1749 b    last modification: 2020-07-01 14:35
1
if
not
modules
then
modules
=
{
}
end
modules
[
'
context
'
]
=
{
2
version
=
1
.
001
,
3
comment
=
"
companion to context.mkiv
"
,
4
author
=
"
Hans Hagen, PRAGMA-ADE, Hasselt NL
"
,
5
copyright
=
"
PRAGMA ADE / ConTeXt Development Team
"
,
6
license
=
"
see context related readme files
"
7
}
8 9
--[[<p>This table specifies what stub files are needed in order to create 10the format. These files are loaded before the format is made so that we 11bypass kpse. When the format itself is used, another stub is used (with 12suffix lui). The current format builder is to a large part determined by 13the way luatex evolved and the process will probaby change.</p>]]
--
14 15
local
method
=
3
16 17
local
stubfiles
=
{
18 19
'
luat-cod.lua
'
,
20 21
-- Here follows a list of trac, luat and data files, but we don't
22
-- it this way any more so there is no need to keep this updated.
23 24
}
25 26
-- This method will trigger the creation of a stub file with all neccessary
27
-- libraries merged. This is how we originally did it.
28 29
if
method
=
=
1
then
30 31
return
stubfiles
32 33
end
34 35
-- This method will use this file as stub file so no merge is needed.
36 37
if
method
=
=
2
then
38 39
if
resolvers
then
40
-- we're loading this file in mtxrun
41
else
42 43
local
sourcepath
=
string
.
gsub
(
arg
and
arg
[
1
]
or
"
"
,
"
/[^/]+$
"
,
"
"
)
44
local
targetpath
=
"
.
"
45 46
if
sourcepath
=
=
"
"
then
sourcepath
=
targetpath
end
47 48
for
i
=
1
,
#
stubfiles
do
49
local
filename
=
sourcepath
.
.
"
/
"
.
.
stubfiles
[
i
]
50
texio
.
write_nl
(
"
preloading
"
.
.
filename
)
51
dofile
(
filename
)
52
end
53
texio
.
write_nl
(
"
\n
"
)
54 55
end
56 57
return
"
context.lus
"
58 59
end
60 61
-- Only a simple stub:
62 63
if
method
=
=
3
then
64 65
return
"
luat-cod.lua
"
66 67
end
68 69
-- The last resort.
70 71
return
stubfiles
72