1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Исправлено формирование строки DLL

Добавлены архитектуры, исправлены ОС
This commit is contained in:
kosmik641
2024-11-21 20:21:53 +03:00
parent 7b1211e0e9
commit 075ea9be5e

View File

@@ -202,15 +202,43 @@ end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- NEW API -- NEW API
local OSes = { local OSes = {
Windows = "win32", Windows = {
Windows64 = "win64", x86 = "win32",
Linux = "linux", x64 = "win64"
Linux64 = "linux64", },
BSD = "linux", Linux = {
POSIX = "linux", x86 = "linux",
OSX = "osx", x64 = "linux64"
},
BSD = {
x86 = "linux",
x64 = "linux64"
},
POSIX = {
x86 = "linux",
x64 = "linux64"
},
OSX = {
x86 = "osx",
x64 = "osx"
},
Other = {
x86 = "linux",
x64 = "linux64"
} }
local dllPath = "./garrysmod/lua/bin/gmsv_turbostroi_"..(OSes[jit.os] or "win32")..".dll" }
local postfix
if OSes[jit.os] then
postfix = OSes[jit.os][jit.arch]
end
if postfix == nil then
print("Can't find gm_turbostroi DLL")
return
end
local dllPath = "./garrysmod/lua/bin/gmsv_turbostroi_"..postfix..".dll"
local ffi = require("ffi") local ffi = require("ffi")
ffi.cdef[[ ffi.cdef[[