I copy zipped love project into love.exe. How love.exe knows how to find scripts when they copied into executable?
How luaL_dofile() function find scripts inside executable?
I'm asking because I want to apply this into my own project but I have no idea how.
This is a property of the zip file format, specifically. Because zips use footers, anything can be prepended to zips. Similarly, because exes use headers, anything can be appended to exes.
As for luaL_dofile, love doesn't use it, but rather implements its own filesystem (love.filesystem) and its own loader based on that and lua_loadstring (love.filesystem.load).
Well I'm more interested in the implementation (probably in C/C++)... because i need to apply similar solution into my own project... i feel that this question will remain unanswered...
Then you might want to ask more specific questions. As I said, appending zips to exes leaves the resulting file both a valid exe and a valid zip, so you can then use any zip reading code you'd like.