summaryrefslogtreecommitdiff
path: root/server/compile.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-03 10:44:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-03 10:44:32 +0800
commit1d3b6f8c0194c5da4f80793da1828c034c4daeef (patch)
tree0294c46a10307670172fd8a4e3440cc471eaeffc /server/compile.lua
parente9137c6077c7de01018f46181c97ab8fe235df4c (diff)
downloadlua-language-server-1d3b6f8c0194c5da4f80793da1828c034c4daeef.zip
编译模块
Diffstat (limited to 'server/compile.lua')
-rw-r--r--server/compile.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/compile.lua b/server/compile.lua
new file mode 100644
index 00000000..aab58cd6
--- /dev/null
+++ b/server/compile.lua
@@ -0,0 +1,28 @@
+local fs = require 'bee.filesystem'
+local root = fs.current_path()
+
+local function compileRelease()
+ local msvc = require 'msvc'
+ if not msvc:initialize(141, 'utf8') then
+ error('Cannot found Visual Studio Toolset.')
+ end
+
+ local property = {
+ Configuration = 'Release',
+ Platform = 'x86'
+ }
+ msvc:compile('build', root / 'bee.lua' / 'project' / 'bee.sln', property)
+end
+
+local function copyFile()
+ local source = root / 'bee.lua' / 'bin' / 'x86' / 'Release'
+ local target = root / 'bin'
+ for _, name in ipairs {'bee.dll', 'lua.exe', 'lua54.dll'} do
+ fs.copy_file(source / name, target / name, true)
+ end
+end
+
+compileRelease()
+copyFile()
+
+print 'make complete.'