I`m currently searching for an Windows Lua-IDE which provides the possibility to create a standalone executable for any platform(e.g. windows, linux, mac os x) out of my script file(s). I searched on google and on SO but all I found was an extra-tool.
Does anyone know this kind of Lua-IDE?
ZeroBrane Studio can be installed in three different ways: Download and install one of the packages provided on the download page. Download the snapshot of the repository. Clone the repository.
There is no "one size fits all" Lua IDE that includes that kind of packaging tool.
That said, the tools do exist, and are not hard to use.
I really like Zero Brane Studio as a general Lua IDE. It comes with a Lua environment built in, and can be used to debug Lua embedded in nearly any host application with only a small change to the host. One feature it provides that I've found to be extremely valuable is a static code analysis tool that finds many common code issues in Lua code. ZBS runs on Windows, Mac, and Linux as well. Its debugger includes support (including live coding) for frameworks such as Löve 2D, Gideros, Moai, and Corona among others as well as plain Lua itself.
For packaging a larger multi-module program into a single Lua source file for distribution, I use Mathew Wild's squish utility. It does a decent job of collecting all source modules into a single file, and can also apply various size reductions such as eliminating extra whitespace and comments, shortening names, and even applying gzip.
The final tool in the mix is a way to fold a Lua source file into a compiled executable. I've used several approaches for that. When building a full hosting application, then it is simple to package the Lua sources as a resource or in a string constant, and simply invoke them with dostring()
or dofile()
as appropriate. Doing things this way allows you to do the most customization to your Lua startup and control over what environment variables are used, and so forth. It also takes a fair bit of effort that may not be required for simpler utilities.
For those cases, a tool such as Luiz Henrique de Figueiredo's srlua is a decent answer. It takes a custom built version of lua.exe
and appends your application's lua source file (perhaps itself built by squish) to it. When run, the stub finds the lua code inside its own executable and runs it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With