1 Installation guidelines
2 =======================
4 ======================================================================
5 TESTING AN INSTALLATION PROCEDURE IS HARD, AND RARELY DONE RIGHT AT
6 THE FIRST TRY. IF YOU EXPERIENCE INSTALLATION TROUBLES, PLEASE REPORT
7 THEM, TO AVOID THEM TO FUTURE USERS. mailto:metalua@gmail.com
8 ======================================================================
12 - a 32 bits, little endian CPU
13 (or the willingness to tweak the bytecode dumper by yourself)
15 - Under Unix-like OSes, GNU/Make.
16 - Under MS-Windows, Microsoft Visual Studio
17 - optionally, your own Lua VM
18 - optionally, the readline library
24 - edit metalua\src\win32\make-win32-msvc.bat, and set the
26 * The directory where you want to put your libs and executables,
28 * The directory where the compiler and linker are,
31 - open a DOS shell in metalua\src, and run the batch file above:
32 d:\fabien\src\metalua\src> win32\make-win32-msvc
34 - Set your environment variables. A script metalua\src\mlua_setenv.bat
35 must have been generated, which contains the appropriate
36 settings. If you want to commit these setting permanently, you'll
37 have to set them in "My Computer" <right-click> "Properties" <click>
38 "Adanced settings" <click> "Environment variables".
42 There is also a migw port, which hasn't been tested for a while and is
43 likely to be broken. I'd be grateful if someone provided a patch for
44 this. I've never tried to compile it under cygwin either, patches are
49 Set your configuration in metalua/src/config:
51 - PLATFORM is the name of the target platform for the Lua VM. You need
52 a platform which supports dynamic library loading, i.e. posix is not
53 OK. The most likely choices are linux, macosx, mingw, freebsd,
56 - TARGET_LUA_PATH is the place where Lua libraries will be
57 installed. It points to a temporary directory by default.
59 - TARGET_LUA_CPATH is the target directory for C libraries. Unless
60 you've got a special reason not to, it's a good idea to use the same
61 directory as for TARGET_LUA_PATH
63 - TARGET_BIN_PATH is the place where binary executables will be put.
65 Other settings should probably not be touched unless you know what
68 After the `make`, the system should be installed; the environment
69 variables required to make it work are set in the generated script
70 setenv.sh. To install them, either do `. setenv.sh`, or recopy them in
77 Under Linux, if you don't have readline and don't want to install it
78 (e.g. you rely on rlwrap or ledit), you'll have to remove -lreadline
79 from lua/Makefile, and to remove the #define LUA_USE_READLINE from
83 If you use your own Lua VM, depending on your OS, you might have
84 problems with unexported symbols required by Pluto. Pluto requires the
85 symbols prefixed with LUAI_FUNC in the VM to be exported, and they
86 aren't by default under Linux and Windows. This is set in luaconf.h;
87 you'll need to change that setting in your own Lua VM if you want to
91 Alternatively, you can let metalua run without Pluto by setting the
92 environment variable LUA_NOSPRINGS to "true". However, this might
93 cause parasitic interactions when several source files are compiled
94 simultaneously, so you'd rather precompile each file and library one
99 There are some samples in metalua/samples, which can be rn simply by
100 typing in the shell `metalua samplename.mlua`. Use `metalua -h` to
101 have an overview of interesting options. Among them, "-a" dumps the
102 AST resulting from a compilation: that's the perfect learning tool for
103 practical-oriented minds.
105 Once you've played with the samples, and maybe written a couple of
106 simple programs, I'm afraid the next step will be to RTFM :)