Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for adjust loaded source libname with shell env LUASTATIC… #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lalawue
Copy link

@lalawue lalawue commented Oct 20, 2021

Add support for adjust libname with shell env LUASTATIC_SOURCE_PATH, define likes LUASTATIC_SOURCE_PATH=“/path/to/proj_a/;path/to/proj_b/;

example:

$ exoprt LUASTATIC_SOURCE_PATH=/usr/local/share/lua/5.1/;app/;
$ luastatic app/main.lua app/models/b.lua /usr/local/share/lua/5.1/packageA/c.lua /usr/local/lib/libluajit-5.1.a -I/usr/local/include/luajit-2.1/

we can require source in app/main.lua as

local b = require(“models.b”)
local c = require(“packageA.c”)

likes export LUA_PATH=“/usr/local/share/lua/5.1/?.lua;app/?.lua”, or package.path=package.path .. “;/usr/local/share/lua/5.1/?.lua;app/?.lua”

…_SOURCE_PATH, define ass LUASTATIC_SOURCE_PATH="/path/to/proj_a/;path/to/proj_b/;"
@ers35 ers35 force-pushed the master branch 3 times, most recently from 203babe to c3e1b2e Compare April 30, 2022 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants