diff options
author | actboy168 <actboy168@gmail.com> | 2019-01-23 15:22:28 +0800 |
---|---|---|
committer | actboy168 <actboy168@gmail.com> | 2019-01-23 15:22:28 +0800 |
commit | c3be19d4c88fa8f544fd9742b3c400cfad5804a0 (patch) | |
tree | 455e3563c85f1d8196d9ed2ef1b4e6d68b7ead32 /make | |
parent | f41b764aa1b6ff6708da9ce84468839635e6720c (diff) | |
download | lua-language-server-c3be19d4c88fa8f544fd9742b3c400cfad5804a0.zip |
替换图标
Diffstat (limited to 'make')
-rw-r--r-- | make/install.lua | 29 |
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) |