mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Исправлено формирование строки DLL
Добавлены архитектуры, исправлены ОС
This commit is contained in:
@@ -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[[
|
||||||
|
|||||||
Reference in New Issue
Block a user