Hi All,
I'd like to be able to execute a code fragment in addition to providing a folder or a file name. I couldn't find any way to provide an option similar to "lua -e" to the love executable. This would be a very useful option to configure debuggers, profiliers, and other components without modifying the source code of main.lua.
Is it already available or can it being considered as a future enhancement?
Paul.
Can Love execute code fragments with an option (like -e)?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 227
- Joined: Thu Jun 28, 2012 8:46 pm
- dreadkillz
- Party member
- Posts: 223
- Joined: Sun Mar 04, 2012 2:04 pm
- Location: USA
Re: Can Love execute code fragments with an option (like -e)
I'm not sure if this is what you're looking for, but you can run Love with a console: https://love2d.org/wiki/Debug.
From there you can load, inspect or execute whatever codes you want without affecting your files.
From there you can load, inspect or execute whatever codes you want without affecting your files.
-
- Party member
- Posts: 227
- Joined: Thu Jun 28, 2012 8:46 pm
Re: Can Love execute code fragments with an option (like -e)
@dreadkillz, it's not quite that; I have seen various console modules, but they still require code changes to be enabled. I'm looking for a way to change execution without code changes.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Can Love execute code fragments with an option (like -e)
It's not possible at the moment, it is however a small code change if you can/want to use a modified version of love.
-
- Party member
- Posts: 227
- Joined: Thu Jun 28, 2012 8:46 pm
Re: Can Love execute code fragments with an option (like -e)
Any plans to implement this? I prefer to use the standard version of love. Just in case, where would I make the change? boot.lua.h?bartbes wrote:It's not possible at the moment, it is however a small code change if you can/want to use a modified version of love.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Can Love execute code fragments with an option (like -e)
That would be "boot.lua".
"boot.lua.h" is automatically generated from the former by running:
"boot.lua.h" is automatically generated from the former by running:
Code: Select all
lua auto.lua boot
Help us help you: attach a .love.
-
- Party member
- Posts: 227
- Joined: Thu Jun 28, 2012 8:46 pm
Re: Can Love execute code fragments with an option (like -e)
Thanks Robin; found it in the repo: https://bitbucket.org/rude/love/src/3cb ... s/boot.lua. For some reason it wasn't in the source archive.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests