Skip to content

Modules for Garry's Mod that add bindings for OS sockets through luasocket.

License

Notifications You must be signed in to change notification settings

danielga/gmod_luasocket

Repository files navigation

gmod_luasocket

Build Status

Modules for Garry's Mod that add bindings for OS sockets through luasocket.

General information

This project is composed by the Lua modules (in includes/modules) and the internal binary modules (socket.core, mime.core, unix and serial, where the last two are Unix only).

You can also refer to this project as gm_luasocket or Luasocket for Garry's Mod.

The Lua files go into lua/includes/modules (just copy the includes directory from this repository onto lua) and the binary modules go into lua/bin.

An optional security wrapper luasocket_wrapper.lua is provided, which must be placed in the same place as the binary modules to work.

Compiling

The only supported compilation platform for this project on Windows is Visual Studio 2017. However, it's possible it'll work with Visual Studio 2015 and Visual Studio 2019 because of the unified runtime.

On Linux, everything should work fine as is.

For macOS, any Xcode (using the GCC compiler) version MIGHT work as long as the Mac OSX 10.7 SDK is used.

If stuff starts erroring or fails to work, be sure to check the correct line endings (\n and such) are present in the files for each OS.

Requirements

This project requires garrysmod_common, a framework to facilitate the creation of compilations files (Visual Studio, make, XCode, etc). Simply set the environment variable 'GARRYSMOD_COMMON' or the premake option 'gmcommon' to the path of your local copy of garrysmod_common.