Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 20 Oct 2013
Offline Last Active Jun 15 2015 08:48 AM

Posts I've Made

In Topic: lua discussion

13 January 2015 - 10:30 AM

ok, i've got that!, i'll work with srlua's source code in my app!

thanks everybody

In Topic: lua discussion

13 January 2015 - 10:00 AM

yes, i want to compile my lua code into stand alone executable

i want to create a game engine and with the lua scripts, create my game and compile it

firstly, can i copy the running script from memory into executable?

secondly, do i need to embed lua inside my scripts witch i need to compile?

then, when i copyed the scripts, how it can find my functions witch i've registered it to lua inside C++?

my problem is, i want to create executables from lua, i dont know witch function is currently executing from the script

about the executable offset, how can i get it?


In Topic: lua discussion

13 January 2015 - 08:09 AM

guys, executables have there own headers!

see MSDN for more information

but after embed lua, do i need to run my app inside the executable?

and, how to create a virtual filesystem inside an executable?


i've compiled my bytecode, it cannot be runned, it depends on my application

for converting it into executable, we can do the following:

1. copy the bytecode into a buffer from memory

2. create that header, and wrapp the functions, meta tables, etc from the application

3. resolve the simbles

4. append the bytecode from the memory into executable

now, how to get the bytecode and store it in memory, how to know witch function is called, and wrapp it, how to resolve simbles, etc

In Topic: lua discussion

12 January 2015 - 10:53 PM

i've embedded lua into my application, but after compiling my scripts into bytecode, what should i do in order to make it stand-alone without need my application?

i want to distribute my stand-alone executable to others

how can i embedd luajit into that executable?

In Topic: lua discussion

12 January 2015 - 03:20 PM

If you only need the way to create something self-running, then you can create native host (executable binary), containing lua/luajit vm, and seeking scripts appended at the end of host's file. Your application will write body of host, and append script (bytecode without debug info) to host body's tail. You can append not just single script, it might be any sort of virtual filesystem, containing group of related lua scripts.

how can i do this?