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

Added Windows and Linux64

This commit is contained in:
CrIcKeT
2021-11-28 14:38:40 +03:00
parent 9556a43493
commit eab4e5bec4

View File

@@ -339,7 +339,9 @@ end
if SERVER then if SERVER then
local OSes = { local OSes = {
Windows = "win32", Windows = "win32",
Windows64 = "win64",
Linux = "linux", Linux = "linux",
Linux64 = "linux64",
BSD = "linux", BSD = "linux",
POSIX = "linux", POSIX = "linux",
OSX = "osx", OSX = "osx",
@@ -360,8 +362,18 @@ if SERVER then
else else
print("Metrostroi: Turbostroi library loaded successfuly.") print("Metrostroi: Turbostroi library loaded successfuly.")
end end
elseif jit.arch ~= "x86" then elseif jit.arch == "x64" and OSes[jit.os.."64"] and file.Exists(Format("lua/bin/gmsv_turbostroi_%s.dll",OSes[jit.os.."64"]), "GAME") then
ErrorNoHalt("Metrostroi: Unsupported architecture "..jit.arch..".\nTurbostroi works only on x86(32 bit) version of server\n") if not pcall(require,"turbostroi") then
if system.IsWindows() then
ErrorNoHalt("======================================================\nMetrostroi: Turbostroi library can't be loaded because of missing libraries!\nCheck, that you have Microsoft visual c++ 2010 and 2017 redistributable(x64) installed\nYou can download it from:\n")
MsgC(Color(255,0,0),"https://www.microsoft.com/en-us/download/details.aspx?id=5555\nhttps://aka.ms/vs/15/release/vc_redist.x64.exe\n")
ErrorNoHalt("======================================================\n")
else
ErrorNoHalt("Metrostroi: Turbostroi library can't be loaded!\n")
end
else
print("Metrostroi: Turbostroi library loaded successfuly.")
end
elseif system.IsWindows() then elseif system.IsWindows() then
ErrorNoHalt("======================================================\nMetrostroi: Turbostroi DLL not found.\nYou can found turbostroi for Windows at \n") ErrorNoHalt("======================================================\nMetrostroi: Turbostroi DLL not found.\nYou can found turbostroi for Windows at \n")
MsgC(Color(255,0,0),"https://metrostroi.net/turbostroi\n") MsgC(Color(255,0,0),"https://metrostroi.net/turbostroi\n")