Jump to content

[WIP] Resource build system


Recommended Posts

Link for the impatient: GitHub repository

If you are not using Git, just click the "Download ZIP" button on the right

I'll upload it to the community site when all basic features are implemented


My hdd that had most of my old projects suffered from some sector faults, so I abandoned it until I can back things up.

After a long time without having an OS for MTA (I was only running Linux), I installed a minimal XP so I can start working on things again.

What is this?

If you have done any serious coding with compiled languages, you probably know what a build system is, this resource provides similar functionalities.

Currently it has a working Lua preprocessor, which will be expanded later, a Meta.xml based settings system that provides the necessary information for building and a "daemon" script, which automatically processes resources before they start.

What is currently missing is an interface to the online compiler. I have done one previously, so it will probably be included in the following days.

There isn't much documentation yet, as the syntax was constantly changing, but it is mostly stable now, so expect a proper readme soon.

The basic syntax:

Everything is controlled sections in your resource's Meta.xml file.

You can use the and tags, the first describes a file to build and the second changes the default behavior of the builder. Each obj tag can override its settings.

It should also be noted that the processing is sequential, so obj before a setting won't be affected by that setting, only the ones after the setting will be affected by it.

Currently there are settings for handling file names and turning the preprocessor on and off.

To be implemented are a setting for passing arbitrary arguments to the preprocessor, one for controlling compilation and a few for caching. (note: caching is not a priority currently, but it should eventually be included)


sometimes you need to clear the clientside cache for changes to take place

there is only basic protection for overwriting source files

the resource needs some ACL rights, read the source before you allow it to run


if a tag refers to a file that will only be created by the build script, the resource will fail to load

there is not much I can do about it as that's just simply how MTA loads and validates them

the easiest solution is creating a placeholder file with the same name and either leaving it empty or putting an error in

If you want to tinker with it, the code is on GitHub. (that's also where bug reports and requests should go)

Contributions are absolutely welcome.

Link to post

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...