- Backwards compatibility
- With small
sv_turbostroi_v2.lua
fix for FFI load
- With small
- Linux compile
- Use Source Engine think instead of our thread
- Linux stable work not guaranteed
- Need testing
- Lock-free queue and spsc_queue use
- Mutex is slow
- Optimization
- Code refactoring
Replace original sv_turbostroi_v2.lua
from this repository.
if you don't do this, it will crash on Linux.
- Create new folder in
garrysmod/addons
- Place
lua
file tolua/metrostroi
in your new folder (you need to create subdirectories)
- Install Visual Studio 2015 or newer
- Get
premake5.exe
for Windows - Place and run
premake5.exe
in this folder:
premake5.exe vs2022
vs2015
for Visual Studio 2015vs2017
for Visual Studio 2017vs2019
for Visual Studio 2019vs2022
for Visual Studio 2022
- Open
x86 Native Tools Command Prompt for VS
command prompt - Go to
external\luajit\src
folder - Run command:
msvcbuild.bat static
- Copy
lua51.lib
toexternal\luajit\x86
- Open
projects\windows\vs2022\turbostroi.sln
- Compile with
Release/Win32
configuration - Copy
projects\windows\vs2022\x86\Release\gmsv_turbostroi_win32.dll
toGarrysModDS\garrysmod\lua\bin
(createbin
folder if it doesn't exist)
- Install
gcc-multilib
apt install gcc-multilib
- Get
premake5.exe
for Linux - Place and run
premake5
in this folder:
chmod +x ./premake5
./premake5 gmake
- In
external/luajit/src/Makefile
find
CC= $(DEFAULT_CC)
and add -m32
parameter:
CC= $(DEFAULT_CC) -m32
- Run
make
inexternal/luajit
directory - Copy
external/luajit/src/libluajit.a
toexternal/luajit/linux32
- Open terminal in
projects/linux/gmake
- Run compilation
make config=release_x86
- Copy
projects/linux/gmake/x86/Release/gmsv_turbostroi_linux.dll
toGarrysModDS\garrysmod\lua\bin
(createbin
folder if it doesn't exist)