diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-30 00:49:25 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-30 00:49:25 +1100 |
commit | 59a08453054698e55a9233b1fd5da998430fc2ed (patch) | |
tree | b7a33286f1492316b6450590c60ec6c0a5845308 /src/defs.js | |
parent | 28b3ebb408ac817ac0f465157c77fc5508e340a5 (diff) | |
download | fengari-59a08453054698e55a9233b1fd5da998430fc2ed.tar.gz fengari-59a08453054698e55a9233b1fd5da998430fc2ed.tar.bz2 fengari-59a08453054698e55a9233b1fd5da998430fc2ed.zip |
src/{defs,loadlib}.js: LUA_(C)PATH_DEFAULT now exported as lua strings
Diffstat (limited to 'src/defs.js')
-rw-r--r-- | src/defs.js | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/defs.js b/src/defs.js index 9eeea00..70d0c73 100644 --- a/src/defs.js +++ b/src/defs.js @@ -358,14 +358,16 @@ if (typeof process === "undefined") { const LUA_CDIR = "./lua/" + LUA_VDIR + "/"; module.exports.LUA_CDIR = LUA_CDIR; - const LUA_PATH_DEFAULT = + const LUA_PATH_DEFAULT = to_luastring( LUA_LDIR + "?.lua;" + LUA_LDIR + "?/init.lua;" + LUA_CDIR + "?.lua;" + LUA_CDIR + "?/init.lua;" + - "./?.lua;./?/init.lua"; + "./?.lua;./?/init.lua" + ); module.exports.LUA_PATH_DEFAULT = LUA_PATH_DEFAULT; - const LUA_CPATH_DEFAULT = - LUA_CDIR + "?.js;" + LUA_CDIR + "loadall.js;./?.js"; + const LUA_CPATH_DEFAULT = to_luastring( + LUA_CDIR + "?.js;" + LUA_CDIR + "loadall.js;./?.js" + ); module.exports.LUA_CPATH_DEFAULT = LUA_CPATH_DEFAULT; } else if (require('os').platform() === 'win32') { const LUA_DIRSEP = "\\"; @@ -384,17 +386,19 @@ if (typeof process === "undefined") { const LUA_SHRDIR = "!\\..\\share\\lua\\" + LUA_VDIR + "\\"; module.exports.LUA_SHRDIR = LUA_SHRDIR; - const LUA_PATH_DEFAULT = + const LUA_PATH_DEFAULT = to_luastring( LUA_LDIR + "?.lua;" + LUA_LDIR + "?\\init.lua;" + LUA_CDIR + "?.lua;" + LUA_CDIR + "?\\init.lua;" + LUA_SHRDIR + "?.lua;" + LUA_SHRDIR + "?\\init.lua;" + - ".\\?.lua;.\\?\\init.lua"; + ".\\?.lua;.\\?\\init.lua" + ); module.exports.LUA_PATH_DEFAULT = LUA_PATH_DEFAULT; - const LUA_CPATH_DEFAULT = + const LUA_CPATH_DEFAULT = to_luastring( LUA_CDIR + "?.dll;" + LUA_CDIR + "..\\lib\\lua\\" + LUA_VDIR + "\\?.dll;" + - LUA_CDIR + "loadall.dll;.\\?.dll"; + LUA_CDIR + "loadall.dll;.\\?.dll" + ); module.exports.LUA_CPATH_DEFAULT = LUA_CPATH_DEFAULT; } else { const LUA_DIRSEP = "/"; @@ -409,14 +413,16 @@ if (typeof process === "undefined") { const LUA_CDIR = LUA_ROOT + "lib/lua/" + LUA_VDIR + "/"; module.exports.LUA_CDIR = LUA_CDIR; - const LUA_PATH_DEFAULT = + const LUA_PATH_DEFAULT = to_luastring( LUA_LDIR + "?.lua;" + LUA_LDIR + "?/init.lua;" + LUA_CDIR + "?.lua;" + LUA_CDIR + "?/init.lua;" + - "./?.lua;./?/init.lua"; + "./?.lua;./?/init.lua" + ); module.exports.LUA_PATH_DEFAULT = LUA_PATH_DEFAULT; - const LUA_CPATH_DEFAULT = - LUA_CDIR + "?.so;" + LUA_CDIR + "loadall.so;./?.so"; + const LUA_CPATH_DEFAULT = to_luastring( + LUA_CDIR + "?.so;" + LUA_CDIR + "loadall.so;./?.so" + ); module.exports.LUA_CPATH_DEFAULT = LUA_CPATH_DEFAULT; } |