[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Make EXE
- From: "Curt Carpenter" <curtc@...>
- Date: Tue, 15 Apr 2003 10:08:59 -0700
Sorry for the Windows-specific message, but since it was asked...
Just put the lua program as a string (or binary if you want to
precompile) resource, load it, and run it. Something like this
(untested):
#include <lua.h>
int main()
{
lua_State * l = lua_open();
HRSRC hres = FindResource(NULL, MAKEINTRESOURCE(MY_LUA_APP),
RT_STRING);
HGLOBAL hmem = LoadResource(NULL, hres);
LPVOID pv = LockResource(hmem);
return lua_dostring(l, (char*) pv);
}
where MY_LUA_APP is the interger id of your resource.
-----Original Message-----
From: owner-lua-l@tecgraf.puc-rio.br
[mailto:owner-lua-l@tecgraf.puc-rio.br] On Behalf Of Ashish Ranjan
Sent: Tuesday, April 15, 2003 6:27 AM
To: Multiple recipients of list
Though it is not as direct, but it is simple one. just use lua2c to
convert your lua program to c and after some todlling,compile it with
your c compiler and hey you get the exe. Even if your using windows
platform , even then you can configure your vc++ (or you can just use
the msys+ming) to run/compile from command line, so that you can make
just a batch file, which will automate the whole process of running
lua2c and then tweaking it somewhat and then compiling it with the
command line compiling tools, we can say this batch file exe maker of
lua scripts.
have a nice day
ashish
--- In lua-l@yahoogroups.com, "wagner" <wjg1@i...> wrote:
> Hello
> I have a LUA 4.0 , and how i can make the program be a executable
(EXE)
> And the same question in the LUA IDE.EXE Much Obliged Wagner