Coming From the Previous Version¶
This version of autoplay2c replaces the previous one. It does the same job in the same way, so your scripts become one module, and each script becomes a call into it. Your projects and project files carry over.
Installing¶
The installer replaces the previous version. When it finds it, it tells you where it's installed
and runs its uninstaller before it installs this version. That removes what the previous
installer put there: the program, its data folder, the Lua DLLs next to it, its shortcuts and
its file association. Your projects, project files and the modules you built are elsewhere, and
stay. This version registers .autoplay2c files again, so double-clicking one keeps working, also
when you picked autoplay2c in Explorer's "Open with" before.
If the previous version was installed for you alone, this version goes into the same folder. If it
was installed for everyone into Program Files (x86), this version goes to
Program Files, because it's a 64-bit program. A folder you picked yourself is kept.
What Stays the Same¶
- Project files. autoplay2c still reads and writes the same
.autoplay2cfiles. Open one in the application, or build it witha2c build MyProject.autoplay2c. The previous version ignores the settings it doesn't know, so the file keeps working in both. - The rewritten project. Scripts become
core.f0();,core.f1(this);and so on, the module isCD_Root\AutoPlay\Scripts\<module>.dll, and the Globals script loads it, as before. - Module names. A module name made from a file name follows the same rules.
- Serialized objects and the tab order, with the same settings.
- Version information, with the same fields. The default information is still "A2C Runtime", now with the version of autoplay2c that built it.
What Is New¶
- AutoPlay Media Studio 9 and Setup Factory. Lua 5.3 and 64-bit modules, see Targets.
- A new compiler. autoplay2c doesn't use lua2c anymore. Its code follows the interpreter, apart from the few limitations, and it's faster, often much faster. See Optimizations.
- No large-stack Lua DLL. Compiled code no longer needs a special
lua5.1.dllfor deep recursion. It runs with the host's own DLL, and deep recursion ends with a cleanstack overflowerror instead of a crash. - No C compiler needed. autoplay2c writes DLLs itself, and tcc is an optional backend.
- Better errors. Syntax errors name the script they're in, with line and column, and all of them are reported at once.
- Directives for extra speed where you want it.
- A command line,
a2c, for build scripts, and an application that runs on Windows, Linux and macOS.
What Was Fixed¶
| Previous version | This version |
|---|---|
| The data folder was replaced everywhere in the source, comments and other text included | Only in strings, at the start of a path |
| Object plugins crashed the object serializer unless excluded | Object plugins always stay in the project |
| Plugin events with unusual argument lists failed | Their arguments are read correctly |
| Hexadecimal colours swapped red and blue | Colours are correct |
| Font sizes came out one point too small for many fonts | Font sizes are rounded as the designer rounds them |
| Pressing Tab on an object outside the tab order raised an error | Tab goes to the first control |
| Very large projects could hit Lua's limit of 200 locals | Each script is its own function, with its own limits |
What to Check¶
- Rebuild every project with this version and test it before you publish, because the generated code is entirely new.
- If you relied on the run-time error messages of compiled code, have a look at Limitations. Most messages now carry the interpreter's exact position and wording.
- Code that uses
coroutine.yielddidn't work in the previous version either, and it doesn't in this one. The difference is that you now get a warning about it.