diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-23 10:34:23 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-23 10:34:23 +0800 |
commit | 41ee24962d3011e179ef0b4ab8acf252132687ff (patch) | |
tree | 8b35a79033486fa6c8667f7043d8027be7972495 | |
parent | 6d6ff4cddafbfafda0c4c4006a775cca19472d10 (diff) | |
download | lua-language-server-41ee24962d3011e179ef0b4ab8acf252132687ff.zip |
编译配置
-rw-r--r-- | .vscode/launch.json | 54 | ||||
-rw-r--r-- | .vscode/tasks.json | 41 | ||||
-rw-r--r-- | server/compile.lua | 36 |
3 files changed, 19 insertions, 112 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index f6135746..e6f98b3e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -36,16 +36,20 @@ "type": "lua", "request": "launch", "stopOnEntry": false, - "program": "${workspaceRoot}/server/compile.lua", + "program": "${workspaceRoot}/server/test/main.lua", "cwd": "${workspaceRoot}/server", - "luaexe": "${workspaceRoot}/server/bee.lua/make/luamake.exe", - "luadll": "${workspaceRoot}/server/bee.lua/make/lua54.dll", - "path": "${workspaceRoot}/server/bee.lua/make/?.lua", - "cpath": "${workspaceRoot}/server/bee.lua/make/?.dll;", + "env": { + "PATH": "${workspaceRoot}\\server\\bin\\" + }, + "luaexe": "${workspaceRoot}\\server\\bin\\lua-language-server.exe", + "luadll": "${workspaceRoot}\\server\\bin\\lua54.dll", + "path": "${workspaceRoot}/server/bin/?.lua", + "cpath": "${workspaceRoot}/server/bin/?.dll;", "arg": [ ], "consoleCoding": "utf8", - "sourceCoding": "utf8" + "sourceCoding": "utf8", + "preLaunchTask": "编译" }, { "name": "发布", @@ -62,44 +66,6 @@ ], "consoleCoding": "utf8", "sourceCoding": "utf8" - }, - { - "type": "extensionHost", - "request": "launch", - "name": "Launch Client", - "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}"], - "outFiles": ["${workspaceRoot}/client/out/**/*.js"], - "preLaunchTask": { - "type": "npm", - "script": "watch" - } - }, - { - "type": "node", - "request": "attach", - "name": "Attach to Server", - "port": 6009, - "restart": true, - "outFiles": ["${workspaceRoot}/server/out/**/*.js"] - }, - { - "name": "Language Server E2E Test", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/client/out/test", - "${workspaceRoot}/client/testFixture" - ], - "outFiles": ["${workspaceRoot}/client/out/test/**/*.js"] - } - ], - "compounds": [ - { - "name": "Client + Server", - "configurations": ["Launch Client", "Attach to Server"] } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5efd8048..13f5cee4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,33 +1,10 @@ { - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "compile", - "group": "build", - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc" - ] - }, - { - "type": "npm", - "script": "watch", - "isBackground": true, - "group": { - "kind": "build", - "isDefault": true - }, - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc-watch" - ] - } - ] -}
\ No newline at end of file + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "label": "编译", + "command": "cd 3rd\\luamake && tools\\ninja -f ninja\\msvc.ninja && cd ..\\.. && 3rd\\luamake\\luamake" + } + ] +} diff --git a/server/compile.lua b/server/compile.lua deleted file mode 100644 index 0dc700af..00000000 --- a/server/compile.lua +++ /dev/null @@ -1,36 +0,0 @@ -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' / 'bee.sln', property) -end - -local function copyFile() - local source = root / 'bee.lua' / 'bin' / 'msvc_x86_Release' - local target = root / 'bin' - for _, name in ipairs { - 'bee.dll', - {'lua.exe', 'lua-language-server.exe'}, - 'lua54.dll', - } do - if type(name) == 'string' then - fs.copy_file(source / name, target / name, true) - else - fs.copy_file(source / name[1], target / name[2], true) - end - end -end - -compileRelease() -copyFile() - -print 'make complete.' |