Skip to content
Snippets Groups Projects
Commit 919c4015 authored by 最萌小汐's avatar 最萌小汐
Browse files

merge cpath

parent 890dfbd1
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,9 @@ local function findExePath() ...@@ -9,7 +9,9 @@ local function findExePath()
end end
local exePath = findExePath() local exePath = findExePath()
local exeDir = exePath:match('(.+)[/\\][%w_.-]+$')
local dll = package.cpath:match '[/\\]%?%.([a-z]+)' local dll = package.cpath:match '[/\\]%?%.([a-z]+)'
package.cpath = ('%s/?.%s;%s'):format(exeDir, dll, package.cpath)
local bee = package.searchpath('bee', package.cpath) local bee = package.searchpath('bee', package.cpath)
if not bee then if not bee then
error('Can not find bee.dll? cpath = ' .. tostring(package.cpath)) error('Can not find bee.dll? cpath = ' .. tostring(package.cpath))
...@@ -19,11 +21,13 @@ if not ok then ...@@ -19,11 +21,13 @@ if not ok then
error(([[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build error(([[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build
errorMsg: %s errorMsg: %s
exePath: %s exePath: %s
exeDir: %s
dll: %s dll: %s
cpath: %s cpath: %s
]]):format( ]]):format(
err, err,
exePath, exePath,
exeDir,
dll, dll,
package.cpath package.cpath
)) ))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment