summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authoractboy168 <actboy168@gmail.com>2019-01-23 15:22:28 +0800
committeractboy168 <actboy168@gmail.com>2019-01-23 15:22:28 +0800
commitc3be19d4c88fa8f544fd9742b3c400cfad5804a0 (patch)
tree455e3563c85f1d8196d9ed2ef1b4e6d68b7ead32 /make
parentf41b764aa1b6ff6708da9ce84468839635e6720c (diff)
downloadlua-language-server-c3be19d4c88fa8f544fd9742b3c400cfad5804a0.zip
替换图标
Diffstat (limited to 'make')
-rw-r--r--make/install.lua29
1 files changed, 22 insertions, 7 deletions
diff --git a/make/install.lua b/make/install.lua
index f492932b..910dab9e 100644
--- a/make/install.lua
+++ b/make/install.lua
@@ -1,13 +1,28 @@
local fs = require 'bee.filesystem'
+local sp = require 'bee.subprocess'
local CWD = fs.current_path()
-fs.create_directories(CWD / 'server' / 'bin')
-fs.copy_file(CWD / 'build' / 'msvc' / 'bin' / 'lni.dll', CWD / 'server' / 'bin' / 'lni.dll', true)
-fs.copy_file(CWD / 'build' / 'msvc' / 'bin' / 'lpeglabel.dll', CWD / 'server' / 'bin' / 'lpeglabel.dll', true)
-fs.copy_file(CWD / '3rd' / 'bee.lua' / 'bin' / 'msvc_x86_release' / 'bee.dll', CWD / 'server' / 'bin' / 'bee.dll', true)
-fs.copy_file(CWD / '3rd' / 'bee.lua' / 'bin' / 'msvc_x86_release' / 'lua54.dll', CWD / 'server' / 'bin' / 'lua54.dll', true)
-fs.copy_file(CWD / '3rd' / 'bee.lua' / 'bin' / 'msvc_x86_release' / 'lua.exe', CWD / 'server' / 'bin' / 'lua-language-server.exe', true)
+local output = CWD / 'server' / 'bin'
+local bindir = CWD / 'build' / 'msvc' / 'bin'
+local beedir = CWD / '3rd' / 'bee.lua' / 'bin' / 'msvc_x86_release'
+
+fs.create_directories(output)
+fs.copy_file(bindir / 'lni.dll', output / 'lni.dll', true)
+fs.copy_file(bindir / 'lpeglabel.dll', output / 'lpeglabel.dll', true)
+fs.copy_file(beedir / 'bee.dll', output / 'bee.dll', true)
+fs.copy_file(beedir / 'lua54.dll', output / 'lua54.dll', true)
+fs.copy_file(beedir / 'lua.exe', output / 'lua-language-server.exe', true)
+
+
+local process = assert(sp.spawn {
+ bindir / 'rcedit.exe',
+ output / 'lua-language-server.exe',
+ '--set-icon',
+ CWD / 'images' / 'icon.ico'
+})
+assert(process:wait())
+
local msvc_crt = dofile 'make/msvc_crt.lua'
-msvc_crt('x86', CWD / 'server' / 'bin')
+msvc_crt('x86', output)