Skip to content

Commit

Permalink
Added LuaJIT check and binary extension .so support.
Browse files Browse the repository at this point in the history
Linux binaries not provided yet.
  • Loading branch information
Avril112113 committed Apr 24, 2024
1 parent 5e39e4a commit ad70ae5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ do
end
end

jit = jit or select(2, pcall(require, "jit"))
if not jit then
print("Must be run with LuaJIT, not " .. _VERSION)
os.exit(-1)
end
local binary_ext = jit.os == "Windows" and "dll" or "so"
package.path = ("{TP}/?.lua;{TP}/?/init.lua;{SSP}/libs/?.lua;{SSP}/libs/?/init.lua;{SSP}/?.lua;{SSP}/?/init.lua;"):gsub("{TP}", TOOL_PATH):gsub("{SSP}", SELENSCRIPT_PATH)
package.cpath = ("{TP}/?.dll;{SSP}/libs/?.dll;"):gsub("{TP}", TOOL_PATH):gsub("{SSP}", SELENSCRIPT_PATH)
package.cpath = ("{TP}/?.{EXT};{SSP}/libs/?.{EXT};"):gsub("{TP}", TOOL_PATH):gsub("{SSP}", SELENSCRIPT_PATH):gsub("{EXT}", binary_ext)

local CLI = require "tool.cli"

Expand Down

0 comments on commit ad70ae5

Please sign in to comment.