Skip to content
Snippets Groups Projects
Commit c3be19d4 authored by actboy168's avatar actboy168
Browse files

替换图标

parent f41b764a
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,6 @@
[submodule "3rd/lpeglabel"]
path = 3rd/lpeglabel
url = https://github.com/sqmedeiros/lpeglabel
[submodule "3rd/rcedit"]
path = 3rd/rcedit
url = https://github.com/electron/rcedit
Subproject commit 6daf749a38b9017e37033d2dce453e66f91d9ab2
images/icon.ico

90.7 KiB

local lm = require 'luamake'
lm.rootdir = '3rd/lni'
lm:lua_library 'lni' {
sources = "src/*.cpp"
sources = '3rd/lni/src/*.cpp'
}
lm.rootdir = '3rd/lpeglabel'
lm:lua_library 'lpeglabel' {
sources = "*.c"
sources = '3rd/lpeglabel/*.c'
}
lm:executable 'rcedit' {
sources = '3rd/rcedit/src/*.cc',
defines = {
'_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING'
},
flags = {
'/wd"C4477"',
'/wd"C4244"',
'/wd"C4267"',
}
}
lm:build 'bee' {
......@@ -17,8 +27,9 @@ lm:build 'bee' {
lm:build 'install' {
'$luamake', 'lua', 'make/install.lua',
deps = {
"lni",
"lpeglabel",
"bee",
'lni',
'lpeglabel',
'bee',
'rcedit'
}
}
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment