Skip to content

The Command Line

a2c is autoplay2c's command line compiler, and it's the one that does the actual work. The application runs it for every build, and you can run it yourself as well, for instance in a build script or on a build server.

a2c is in the folder you installed autoplay2c in. To type just a2c, tick Add a2c to the PATH in the installer, see Installation.

a2c build MyProject.autoplay
a2c build MyProject.autoplay2c
a2c build tools.lua --target suf9-x86

Commands

Command What it does
a2c build Compile a Lua file into a module DLL, or an AutoPlay project into a module DLL and a project that calls it
a2c probe Write a copy of a project that logs its objects' properties, to check serialized objects
a2c help Show the commands, or the options of one: a2c help build
a2c --version Show the version

Exit Status

a2c exits with status 0 when it succeeds, and with 1 when anything stopped it, such as a syntax error, a missing file or a wrong option. Messages go to standard error, and you can read more about them in Diagnostics. This way, a build script can stop as soon as a build fails:

a2c build MyProject.autoplay2c || exit /b 1