From 1d3b6f8c0194c5da4f80793da1828c034c4daeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 3 Dec 2018 10:44:32 +0800 Subject: =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 21 +++++++++++++++++++-- server/bin/bee.dll | Bin 142336 -> 185856 bytes server/bin/lua.exe | Bin 15872 -> 15872 bytes server/bin/lua54.dll | Bin 254976 -> 254976 bytes server/compile.lua | 28 ++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 server/compile.lua diff --git a/.vscode/launch.json b/.vscode/launch.json index 71f55595..780687c2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,9 +12,9 @@ "env": { "PATH": "${workspaceRoot}\\server\\bin\\" }, - "luaRuntime": "5.3 32bit", + "luaRuntime": "5.4 32bit", "luaexe": "${workspaceRoot}\\server\\bin\\lua.exe", - "luadll": "${workspaceRoot}\\server\\bin\\lua53.dll", + "luadll": "${workspaceRoot}\\server\\bin\\lua54.dll", "path": "${workspaceRoot}/server/bin/?.lua", "cpath": "${workspaceRoot}/server/bin/?.dll;", "arg": [ @@ -32,6 +32,23 @@ "ip": "localhost", "port": 546858 }, + { + "name": "编译", + "type": "lua", + "request": "launch", + "stopOnEntry": false, + "program": "${workspaceRoot}/server/compile.lua", + "cwd": "${workspaceRoot}/server", + "luaRuntime": "5.4 32bit", + "luaexe": "${workspaceRoot}/server/bee.lua/make/luamake/lua.exe", + "luadll": "${workspaceRoot}/server/bee.lua/make/luamake/lua54.dll", + "path": "${workspaceRoot}/server/bee.lua/make/luamake/?.lua", + "cpath": "${workspaceRoot}/server/bee.lua/make/luamake/?.dll;", + "arg": [ + ], + "consoleCoding": "utf8", + "sourceCoding": "utf8" + }, { "type": "extensionHost", "request": "launch", diff --git a/server/bin/bee.dll b/server/bin/bee.dll index 40bc0943..44c1c1d3 100644 Binary files a/server/bin/bee.dll and b/server/bin/bee.dll differ diff --git a/server/bin/lua.exe b/server/bin/lua.exe index 4b0f560d..13dba1f4 100644 Binary files a/server/bin/lua.exe and b/server/bin/lua.exe differ diff --git a/server/bin/lua54.dll b/server/bin/lua54.dll index 461038b7..c33a5125 100644 Binary files a/server/bin/lua54.dll and b/server/bin/lua54.dll differ diff --git a/server/compile.lua b/server/compile.lua new file mode 100644 index 00000000..aab58cd6 --- /dev/null +++ b/server/compile.lua @@ -0,0 +1,28 @@ +local fs = require 'bee.filesystem' +local root = fs.current_path() + +local function compileRelease() + local msvc = require 'msvc' + if not msvc:initialize(141, 'utf8') then + error('Cannot found Visual Studio Toolset.') + end + + local property = { + Configuration = 'Release', + Platform = 'x86' + } + msvc:compile('build', root / 'bee.lua' / 'project' / 'bee.sln', property) +end + +local function copyFile() + local source = root / 'bee.lua' / 'bin' / 'x86' / 'Release' + local target = root / 'bin' + for _, name in ipairs {'bee.dll', 'lua.exe', 'lua54.dll'} do + fs.copy_file(source / name, target / name, true) + end +end + +compileRelease() +copyFile() + +print 'make complete.' -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0