diff options
Diffstat (limited to '')
| -rwxr-xr-x | binary/all_in_one | 10 |
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 | |||
| 44 | local LUA_MODULES = TARGET_DIR .. "/lua_modules" | 44 | local LUA_MODULES = TARGET_DIR .. "/lua_modules" |
| 45 | local CONFIG_DIR = TARGET_DIR .. "/.luarocks" | 45 | local CONFIG_DIR = TARGET_DIR .. "/.luarocks" |
| 46 | 46 | ||
| 47 | package.path = "./src/?.lua;" .. package.path | 47 | package.path = "./src/?.lua;" .. "./vendor/?.lua;" .. package.path |
| 48 | 48 | ||
| 49 | local fs = require("luarocks.fs") | 49 | local fs = require("luarocks.fs") |
| 50 | local cfg = require("luarocks.core.cfg") | 50 | local cfg = require("luarocks.core.cfg") |
| @@ -385,17 +385,17 @@ end | |||
| 385 | 385 | ||
| 386 | local function nonnull(x) return x ~= nil end | 386 | local function nonnull(x) return x ~= nil end |
| 387 | 387 | ||
| 388 | local function generate(main_program, dir, skip) | 388 | local 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/?" }) |
| 501 | end | 501 | end |
| 502 | 502 | ||
| 503 | main() | 503 | main() |
