diff options
Diffstat (limited to 'Master/texmf-dist/scripts/context/stubs/source/mtxrun_dll.c')
-rw-r--r-- | Master/texmf-dist/scripts/context/stubs/source/mtxrun_dll.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/context/stubs/source/mtxrun_dll.c b/Master/texmf-dist/scripts/context/stubs/source/mtxrun_dll.c index 5b7cd31a07b..27841c68764 100644 --- a/Master/texmf-dist/scripts/context/stubs/source/mtxrun_dll.c +++ b/Master/texmf-dist/scripts/context/stubs/source/mtxrun_dll.c @@ -113,13 +113,22 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] ) // find texlua.exe if ( !SearchPath( - getenv( "PATH" ), // path to search (optional) - "texlua.exe", // file name to search - NULL, // file extension to add (optional) - MAX_PATH, // output buffer size - luatexpath, // output buffer pointer - &luatexfname ) // pointer to a file part in the output buffer (optional) - ) DIE( "unable to locate texlua.exe on the search path" ); + getenv( "PATH" ), // path to search (optional) + "texlua.exe", // file name to search + NULL, // file extension to add (optional) + MAX_PATH, // output buffer size + luatexpath, // output buffer pointer + &luatexfname ) // pointer to a file part in the output buffer (optional) + ) + if ( !SearchPath( + dirpath, // path to search (optional) + "texlua.exe", // file name to search + NULL, // file extension to add (optional) + MAX_PATH, // output buffer size + luatexpath, // output buffer pointer + &luatexfname ) // pointer to a file part in the output buffer (optional) + ) + DIE( "unable to locate texlua.exe on the search path" ); // link directly with luatex.dll if available in texlua's dir |