lua-users home
lua-l archive

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

Hi Mike,

sorry for the confusion - as I said it was quite a crude solution. I wrote this functionality as "Add-On" to the standard srlua, so

ad 1) it's the glue.exe that you build from glue.c in srlua, no changes made here

ad 2) yes, it's that glue.exe. I just added one source - srluaz.c - to my very same srlua directory and use this one to build a srluaz.exe. There are short instructions at the comment for main() in srluac.c, but they have a slight error, so here are the correct ones:

* Short instructions:
* To create a self running executable:
* - one single lua file:
*   glue srlua.exe foo.lua foo.exe
* - multiple files stored in one zip file:
*   glue srluaz.exe bar.exe Z
* 'glue' is the unchanged executable as provided by the srlua package.
* 'srlua' is the executable created from the unchanged srlua.c C module.
* 'srluaz' is the executable created from this C module.
*  ...

Feel free to ask further questions,

Mike Crowe wrote:


That's what I was looking for.  Questions:

1) You appear to need glue.exe in your file, however, it's not there (or isn't in the archive in the message). 2) I found glue.exe in srlua project. What's different between your mysrlua and srlua?


Frank Bechmann wrote:

This is the 1st thing I wanted to have in Lua, so I came up w/ a quite crude solution, see there:

Limitations are described there.
If you need the sources just drop me a mail.

Regards, Frank

Mike Crowe wrote:

Hi folks,

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:
   lua myfile.luac

I get an error like:
lua: cannot read compat.lua: No such file or directory
stack traceback:
       [C]: in function `dofile'
       all.lua:9: in main chunk
       (luac): in main chunk
       [C]: ?

(compat.lua is one of the files in my project).

What am I missing here?


In Him, Mike


No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 10.02.2005

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 10.02.2005