summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authoractboy168 <actboy168@gmail.com>2021-05-09 15:14:01 +0800
committeractboy168 <actboy168@gmail.com>2021-05-09 15:14:01 +0800
commita82525de76c6f4e88abe2944022021180393705a (patch)
treec836873e1cb2ba6aa95dd11aee2721dc7dcbf4ef /make
parentab86c72022a5a002c3acded97b71d5d0e8903bdc (diff)
downloadlua-language-server-a82525de76c6f4e88abe2944022021180393705a.zip
fixes bug
Diffstat (limited to 'make')
-rw-r--r--make/install.lua11
-rw-r--r--make/unittest.lua3
2 files changed, 6 insertions, 8 deletions
diff --git a/make/install.lua b/make/install.lua
index 75556ac1..036f0f4b 100644
--- a/make/install.lua
+++ b/make/install.lua
@@ -1,20 +1,19 @@
-local platform = ...
+local builddir = ...
local fs = require 'bee.filesystem'
-local sp = require 'bee.subprocess'
local pf = require 'bee.platform'
local CWD = fs.current_path()
local output = CWD / 'bin' / pf.OS
-local bindir = CWD / 'build' / platform / 'bin'
-local exe = platform == 'msvc' and ".exe" or ""
-local dll = platform == 'msvc' and ".dll" or ".so"
+local bindir = CWD / builddir / 'bin'
+local exe = pf.OS == 'Windows' and ".exe" or ""
+local dll = pf.OS == 'Windows' and ".dll" or ".so"
fs.create_directories(output)
fs.copy_file(bindir / 'lpeglabel'..dll, output / 'lpeglabel'..dll, true)
fs.copy_file(bindir / 'bee'..dll, output / 'bee'..dll, true)
fs.copy_file(bindir / 'lua'..exe, output / 'lua-language-server'..exe, true)
-if platform == 'msvc' then
+if pf.OS == 'Windows' then
fs.copy_file(bindir / 'lua54'..dll, output / 'lua54'..dll, true)
require 'msvc'.copy_vcrt('x64', output)
end
diff --git a/make/unittest.lua b/make/unittest.lua
index 25839c96..1c2c2d6f 100644
--- a/make/unittest.lua
+++ b/make/unittest.lua
@@ -1,8 +1,7 @@
-local platform = ...
local fs = require 'bee.filesystem'
local sp = require 'bee.subprocess'
local pf = require 'bee.platform'
-local exe = platform == 'msvc' and ".exe" or ""
+local exe = pf.OS == 'Windows' and ".exe" or ""
local CWD = fs.current_path()
local process = assert(sp.spawn {