summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
m---------3rd/rcedit0
-rw-r--r--images/icon.icobin0 -> 92854 bytes
-rw-r--r--make.lua25
-rw-r--r--make/install.lua29
5 files changed, 43 insertions, 14 deletions
diff --git a/.gitmodules b/.gitmodules
index 1469f39b..ebb3906a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -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
diff --git a/3rd/rcedit b/3rd/rcedit
new file mode 160000
+Subproject 6daf749a38b9017e37033d2dce453e66f91d9ab
diff --git a/images/icon.ico b/images/icon.ico
new file mode 100644
index 00000000..05a4a510
--- /dev/null
+++ b/images/icon.ico
Binary files differ
diff --git a/make.lua b/make.lua
index 5b00cb73..e5c30b1a 100644
--- a/make.lua
+++ b/make.lua
@@ -1,13 +1,23 @@
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'
}
}
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)