Editing LOVE's source .lua files

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MinatureCookie
Prole
Posts: 2
Joined: Mon Aug 12, 2013 9:24 pm

Editing LOVE's source .lua files

Post by MinatureCookie »

Hey everyone,

First of all, just wanted to say hello. Hello!

Secondly, I was hoping for a bit of help messing about with the LOVE framework.

tl;dr: What's up with boot.lua -> boot.lua.h?

Basically I've got everything all running fine, and I started trying to edit the boot.lua (src/scripts/boot.lua). Now, long story short, I finally worked out that boot.lua actually does nothing, and boot.lua.h is where it's all at - as a hex string representation of the boot.lua file

Now, I mean... I could set up a script to convert the boot.lua file into the boot.lua.h format no problem... But I'm guessing this is a standard approach to using Lua with C++, that I just know nothing about.

Also sorry if this isn't strictly the right place to be seeking help about this? I know this is primarily a forum for seeking support with using the framework, rather than building it!
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Editing LOVE's source .lua files

Post by Boolsheet »

Yes, you have to convert it first. Edit boot.lua and then use auto.lua to generate the new boot.lua.h.

Go into the scripts directory and execute.

Code: Select all

lua auto.lua boot
Shallow indentations.
MinatureCookie
Prole
Posts: 2
Joined: Mon Aug 12, 2013 9:24 pm

Re: Editing LOVE's source .lua files

Post by MinatureCookie »

Ahh, I didn't spot auto.lua, thanks!

Is this method of lua binding a standard? I've noticed by trawling the web there's a few ways of doing this, such as luabind
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Editing LOVE's source .lua files

Post by Boolsheet »

You mean the interface between LÖVE and Lua? Nothing special there, just straight up Lua C API calls. I don't think there's a standard for that, but there are a few projects out there that try to simplify it, as you noticed.

The embedding of the Lua files is just a simple and convenient way to have the data accessible at run-time.
Shallow indentations.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests