mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
958f357257
- Deleted the Python build files - Main documentation updated with information about how to use build_elua - CSS updated to provide a bit of free space at the top of <h2> headings. - Added rpc-lua.lua - Fixed cross-compilation errors References to scons still exist in the docs, they'll have to be removed.
32 lines
3.4 KiB
Plaintext
32 lines
3.4 KiB
Plaintext
// $$HEADER$$
|
|
Building eLua in Windows
|
|
------------------------
|
|
|
|
IMPORTANT: Starting with eLua 0.10, a new Lua-based build system replaces the previous Python based (scons) build system. You'll need to update
|
|
your machine environment accordingly, as per the instructions below.
|
|
|
|
Starting with version 0.7, building eLua in Windows is officially supported. The following instructions were tested in Windows 7 Professional, but they should work with little or no modification in any version of Windows 7, Vista or XP. You need to download and install a few things first:
|
|
|
|
* *a toolchain*: building a GCC-based toolchain under Windows is possible but not easy. We found that the easiest thing to do is to download a pre-built toolchain and install it. Currently, all the targets supported by eLua (except i386) have at least one toolchain that runs under Windows:
|
|
|
|
** For ARM7, ARM9 and Cortex-M3 targets, you can download and install the CodeSourcery Lite Edition (supported by eLua out of the box) from link:http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite[here]. For reference, the version used in this tutorial is
|
|
"Sourcery G++ Lite 2009q3-68 for ARM EABI". Future (and some previous) versions of this toolchain should also work. Remember to specify `toolchain=codesourcery` when using this toolchain (see link:building.html#buildoptions[build options] for details).
|
|
|
|
** AVR32 has its own Windows based GNU toolchain that can be downloaded from Atmel link:http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4118[here].
|
|
|
|
* *lua*: a very good and versatile Lua distribution for Windows is "Lua for Windows", it can be downloaded from link:http://luaforwindows.luaforge.net/[here]. Besides Lua itself, it includes a lot of very useful Lua modules, so I highly recommend it. Version 5.1.4.30 of Lua for Windows will be used in this tutorial.
|
|
|
|
* *git*: if you need to checkout the *eLua* source code from the link:https://github.com/elua/elua[project git repository], then you will need to install git for Windows. The instructions at GitHub describing how to link:http://help.github.com/win-set-up-git/[set up git] for Windows should work well. You will only need the ssh key setup section if you want to push code to GitHub. For a version of git that integrates with the Windows shell (similar to TortoiseSVN), check out link:http://code.google.com/p/tortoisegit/[TortoiseGIT].
|
|
|
|
* *gcc*: if you want to use the ROMFS pre-compiled feature (see link:arch_romfs.html#mode[here] for details), then you will need to build an image for the eLua cross compiler, and you will need an i386 toolchain for this. I'm using MinGW for this task. It can be downloaded from link:http://www.mingw.org/[here]. This tutorial uses MinGW version 5.1.6. Note that you don't need to install MSYS; MinGW should be enough. Cygwin should work equally as well, or even Microsoft's Visual Studio (not tested). To build the cross compiler, run this command from the command line:
|
|
+
|
|
-------------------
|
|
$ lua cross-lua.lua
|
|
-------------------
|
|
|
|
Make sure that all the programs listed above are added to %PATH%. Most of them do this automatically, or have an option to do this automatically, but some (for example MinGW and SCons) do not and you will need to add them to %PATH% manually.
|
|
|
|
After you setup your build environment as described above, follow link:building.html#configuring[this tutorial] to build your eLua image.
|
|
|
|
// $$FOOTER$$
|