lua-users home
lua-l archive

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


If anyone is willing to wade through my posting of a bit of email 
>from outside this list, and offer a complete working answer, I'll not 
only be grateful; I'll put it to good use and be making tools others 
can use..

That pasted text outlines the problem well enough, I hope, so I won't 
restate it. Instead I'll just illustrate one paradox:

Windows is not an easy system for building from code, and far more 
able people than me have found it notoriously awkward, and it's my 
frustration with trying to work at that 
level that made me wish for a simple answer. My experience with Lua, 
in PtokaX, is my one breakthrough, apart from JavaScript, so the 
paradox is: If I could do all the compiling and coding of the support 
systems, I wouldn't need to ask for this help. :) Please consider 
this before pointing me to compilers and developement tools and such, 
as that really is not what I need. I'd like to drive, but I really 
would like to avoid having to build the car..
Thankyou.




>>Hello, I am totally lost.
>>I can program Lua 4 as it is used in PtokaX, and I want to run this, 
>>or Lua 5, in the same easy way, but to build standalone commandline 
>>executables for Windows or DOS. (Basically small customised tools for 
>>my own use..)
>>
>>I have trawled the net several times and it just blinds me. I found 
>>nothing that looks remotely like an answer to this simple need, and 
>>found instead an abstracted nightmare of multiple levels of support 
>>systems that seemed to be drawn as if they were people without legs. 
>>I can't imagine how they can interact with the real world, let alone 
>>make them do it.
>>
>>Please forgive me for this apparent newbyishness, but I think it's a 
>>fair question. I'm able to program in Lua, able to figure out how to 
>>solve some problems by direct hacking of executables even, yet I am 
>>stumped by this.
>>
>>What I need is to write a simple page of code, relying on the manual 
>>and my own efforts, then have that code compiled to a standalone 
>>executable once I have the file read/writes and such tested and 
>>working, and it has to be a very simple tool to use in a Windows 
>>system. Does such a thing exist in complete and very small and simple 
>>form; and if so, where?
>>
>>Please tell me. :)
>>Thankyou.
>>Crow.
>
>
>
>
>Luiz Henrique de Figueiredo <address removed to protect him from spam :)> wrote:
>(24/08/2004 12:53)
>
>
>> What I need is to write a simple page of code, relying on the manual 
>> and my own efforts, then have that code compiled to a standalone 
>> executable
>
>I have wanted to do that for some time now. Just the other day I learned
>how to do that for ELF files in Unix, and I'm working on a tool for
>this. I still don't know about .EXE files in Windows or DOS. It must be
>possible, of course, because there are self-extracting ZIP files and
>such. Perhaps I'll try to find info on this. If you know, please tell me.
>
>I'm not sure you can simply append arbitrary stuff to a .EXE file. If you
>can, then it's simple to append your Lua program to a .EXE of a customized
>Lua interpreter that looks into itself for the appended Lua program. One
>problem is being able to open the .EXE as a file. If argv[0] is correct,
>then this is trivial. That problem solved, the next step is finding the
>Lua program inside the .EXE. The simplest solution seems to seek to the end
>and then read there the location of the start of the Lua program (which
>will be the size of original .EXE). Of course, you'll need a simple tool
>to build this new .EXE file.
>
>I'm sorry I cannot give you code for this right now. I suggest you ask
>in the Lua mailing list. There are many Windows experts there.
>--lhf