diff options
Diffstat (limited to 'make/install.lua')
-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) |