lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



I use some similar methods, where I need to include some binary-font data in
my script and I only want to distribute /one/ file.
I compile it with
     luac -s -o application.luac usebindata.lua bindata.lua
and the distrubute only the luac file.
Thank you!  This solves my immediate problem.
Well, then I should give you the whole thing. I simplified some things, the real solution would be:
= bindata.lua =
module"bindata"
function data()
return "whateveryouneed"
end
= usebindata.lua =
local bindata=require("bindata").data()
print(#bindata)
for i=1,#bindata do
    print(i,string.byte(bindata,i))
end
= Makefile.mak =
all:
    luac -s -o application.luac bindata.lua usebindata.lua
+ end +

Regards