[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Compiling pure Lua project into singe file
- From: Daniel Quintela <dq@...>
- Date: Sun, 13 Feb 2005 16:54:58 -0300
Mike Crowe escribió:
This is probably very easy, but I can't seem to see how to do it. I
have a complete project of ~12 .lua files that I want to distribute.
Windows platform. Assume destination has lua.exe and luac.exe
I thought the answer was to:
luac -o myfile.luac file1.lua file2.lua file3.lua .... file12.lua
That creates "myfile.luac" that appears to be all the files together.
However, if I copy this file to a new directory, and execute:
I get an error like:
lua: cannot read compat.lua: No such file or directory
[C]: in function `dofile'
all.lua:9: in main chunk
(luac): in main chunk
(compat.lua is one of the files in my project).
What am I missing here?
Other way to pack several scripts:
1) Download ckurmi.exe from:
2) Name the main script (the first to be called) "kurmi.lua" (even if it
3) Compile each script separately.
4) Put all the compiled scripts inside a standard Zip file.
5) Create the exe+lua unit as:
copy ckurmi.exe/B + TheScripts.zip/B TheDist.exe/B
6) Now you can test it running TheDist.exe
1) Use kurmi.dofile instead of dofile (or do: dofile = kurmi.dofile
before the first call).
2) You can use kurmi.loadfile (loadfile clone). Don't forget to put the
.dll inside the .zip