aboutsummaryrefslogtreecommitdiff
path: root/binary/all_in_one
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbinary/all_in_one10
1 files changed, 5 insertions, 5 deletions
diff --git a/binary/all_in_one b/binary/all_in_one
index e3d595d7..1b096936 100755
--- a/binary/all_in_one
+++ b/binary/all_in_one
@@ -44,7 +44,7 @@ end
44local LUA_MODULES = TARGET_DIR .. "/lua_modules" 44local LUA_MODULES = TARGET_DIR .. "/lua_modules"
45local CONFIG_DIR = TARGET_DIR .. "/.luarocks" 45local CONFIG_DIR = TARGET_DIR .. "/.luarocks"
46 46
47package.path = "./src/?.lua;" .. package.path 47package.path = "./src/?.lua;" .. "./vendor/?.lua;" .. package.path
48 48
49local fs = require("luarocks.fs") 49local fs = require("luarocks.fs")
50local cfg = require("luarocks.core.cfg") 50local cfg = require("luarocks.core.cfg")
@@ -385,17 +385,17 @@ end
385 385
386local function nonnull(x) return x ~= nil end 386local function nonnull(x) return x ~= nil end
387 387
388local function generate(main_program, dir, skip) 388local function generate(main_program, src_dir, vendor_dir, skip)
389 local program_name = main_program:gsub(".*/", "") 389 local program_name = main_program:gsub(".*/", "")
390 390
391 local hardcoded = write_hardcoded_module(dir) 391 local hardcoded = write_hardcoded_module(src_dir)
392 392
393 local out = {} 393 local out = {}
394 table.insert(out, ([[static const char* progname = %q;]]):format(program_name)) 394 table.insert(out, ([[static const char* progname = %q;]]):format(program_name))
395 table.insert(out, c_preamble) 395 table.insert(out, c_preamble)
396 load_main(out, main_program, program_name) 396 load_main(out, main_program, program_name)
397 local lua_modules = LUA_MODULES .. "/share/lua/" .. cfg.lua_version 397 local lua_modules = LUA_MODULES .. "/share/lua/" .. cfg.lua_version
398 declare_modules(out, { dir, lua_modules }, skip) 398 declare_modules(out, { src_dir, vendor_dir, lua_modules }, skip)
399 local a_files = declare_libraries(out, LUA_MODULES .. "/lib/lua/" .. cfg.lua_version) 399 local a_files = declare_libraries(out, LUA_MODULES .. "/lib/lua/" .. cfg.lua_version)
400 table.insert(out, c_main) 400 table.insert(out, c_main)
401 401
@@ -497,7 +497,7 @@ local function main()
497 end 497 end
498 end 498 end
499 499
500 generate(MAIN_PROGRAM, "src", { EXCLUDE, "^bin/?" }) 500 generate(MAIN_PROGRAM, "src", "vendor", { EXCLUDE, "^bin/?" })
501end 501end
502 502
503main() 503main()