LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
Project Homepage: https://luajit.org/
LuaJIT is Copyright (C) 2005-2023 Mike Pall. LuaJIT is free software, released under the MIT license. See full Copyright Notice in the COPYRIGHT file or in luajit.h.
Documentation for LuaJIT is available in HTML format. Please point your favorite browser to:
doc/luajit.html
This is a mirror of the official LuaJIT repository, including Heatblur specific
modifications for our modules in the branch windows_unicode
.
LuaJIT, by default, does not support loading Lua-files from Unicode paths, such as
local file = require('你好')
or also when package.path
contains base paths like C:/Users/你好/SavedGames
.
LuaJIT relies on the platforms default encoding. For Windows, this happens to
not support UTF-8 or similar. The underlying C-code behind require
can be
found around src/lib_io.c
, src/lib_package.c
and src/li_load.c
, which are
based on using fopen
.
We fix the issue by using the platform specific _wfopen
variant instead.
Going platform dependent is okay for us, since we only target Windows anyways.
Follow the instructions in doc/install.html
(also see online version).
It consists of opening the repository folder in x86_x64 Cross Tools Command Prompt for VS 2022:
Navigating into the src
subfolder and executing the msvcbuild
bat.
The script generates a bunch of files that have to be copied into the module repositories (e.g. anvil).
Copy:
- all
lua
files fromLuaJIT/src/jit
toanvil/ext/luajit/bin/lua/jit
- all
lib
,dll
andexe
files fromLuaJIT/src
toanvil/ext/luajit/bin
- all
h
andhpp
files fromLuaJIT/src
toanvil/ext/luajit/include