Jump to content

Lua Directory Compiler


Recommended Posts

Hey all,

I've made a small Python script for compiling all the Lua scripts in a directory (recursively). In order to use it, you need to have Python installed on your PC, and have the Lua compiler (luac.exe) added to the Windows PATH (if your using Windows, should be added automatically). It should be cross-compatible, thought I haven't tested it yet.

To use it, simple put it in the directory you want to compile (i.e in your resource, next to meta.xml), and double-click. It should execute like a normal program, unless you've set python scripts to automatically open in an editor. The script will backup the entire resource before compiling, if requested.

This script is mostly useful for people wishing to compile entire resources before deploying them to a remote server (to prevent theft in case of an hacker getting into your FTP), as the new protected flag in meta.xml takes care of client-side scripts.

I plan on hopefully making errors less mysterious in the future. Let me know if you have any feedback!

Download

Sauce

Python

Configuring Python for Windows

Edited by Guest
Link to comment
hey, If I compile my script and upload to the community. Can they still use it?

And it possible to compile .map files?

- DLmass

1 - If you release a script on the community, it should be open-source. While this isn't a requirement, it is highly discouraged to upload compiled resources to the community (just ask Mate_).

2 - You can't compile .map files. You can obfuscate them and create your own loader, but then that loader can most likely be decompiled.

3 - There's no point in putting -DLmass at the end your your post since I can clearly see your forum name.

Just to those that are asking: the .pyc file is equivalent to a .luac, it is a compiled Python script meant for people that just want to run it. The .py file is the source.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...