From 7c17829b96ef637d29f3c89d1420a0dada21b577 Mon Sep 17 00:00:00 2001 From: penev92 Date: Fri, 30 Dec 2022 00:18:09 +0200 Subject: [PATCH] Added VSCode configuration - OpenRA PR 18280 - "Add support for Visual Studio Code. " and its follow-ups 18786, 18954, 19026, 19379, 19785, 19787, 19933, 20003. - Added launch profile for the Utility and a VSCode task to run it - OpenRA PR 20009. --- .vscode/launch.json | 47 +++++++++++++++++++++++++++------------------ .vscode/tasks.json | 46 +++++++++++++++++++++++++++++++++----------- omnisharp.json | 5 +++++ 3 files changed, 68 insertions(+), 30 deletions(-) create mode 100644 omnisharp.json diff --git a/.vscode/launch.json b/.vscode/launch.json index f29a136..533932d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,21 +1,30 @@ { - "version": "0.2.0", - "configurations": [ - { - "name": "Mod SDK Example", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceRoot}/engine/bin/OpenRA.dll", - "windows": { - "program": "${workspaceRoot}/engine/bin/OpenRA.exe", - }, - "args": [ - "Engine.EngineDir=${workspaceRoot}/engine", - "Engine.ModSearchPaths=${workspaceRoot}/mods", - "Game.Mod=example", - "Debug.DisplayDeveloperSettings=true", - ] - }, - ] + "version": "0.2.0", + "configurations": [ + { + "name": "Launch (Example)", + "type": "coreclr", + "request": "launch", + "program": "${workspaceRoot}/engine/bin/OpenRA.dll", + "args": [ + "Game.Mod=example", + "Engine.EngineDir=${workspaceRoot}/engine", + "Engine.ModSearchPaths=${workspaceRoot}/mods, ${workspaceRoot}/engine/mods", + "Debug.DisplayDeveloperSettings=true", + ], + "preLaunchTask": "build", + }, + { + "name": "Launch Utility", + "type": "coreclr", + "request": "launch", + "program": "${workspaceRoot}/engine/bin/OpenRA.Utility.dll", + "args": ["example", "--docs", "{DEV_VERSION}"], + "env": { + "ENGINE_DIR": "${workspaceRoot}/engine", + "MOD_SEARCH_PATHS": "${workspaceRoot}/mods, ${workspaceRoot}/engine/mods" + }, + "preLaunchTask": "build", + }, + ], } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index fc48764..a81ea02 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,13 +1,37 @@ { - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "make", - "args": ["all"], - "windows": { - "command": "make.cmd" - } - } - ] + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "make", + "args": ["all", "CONFIGURATION=Debug"], + "windows": { + "command": "make.cmd" + } + }, + { + "label": "Run Utility", + "command": "dotnet ${workspaceRoot}/engine/bin/OpenRA.Utility.dll ${input:modId} ${input:command}", + "type": "shell", + "options": { + "env": { + "ENGINE_DIR": "${workspaceRoot}/engine", + "MOD_SEARCH_PATHS": "${workspaceRoot}/mods,${workspaceRoot}/engine/mods" + } + } + } + ], + "inputs": [ + { + "id": "modId", + "description": "ID of the mod to run", + "default": "all", + "type": "promptString" + }, { + "id": "command", + "description": "Name of the command + parameters", + "default": "", + "type": "promptString" + }, + ] } diff --git a/omnisharp.json b/omnisharp.json new file mode 100644 index 0000000..2ba5d8b --- /dev/null +++ b/omnisharp.json @@ -0,0 +1,5 @@ +{ + "RoslynExtensionsOptions": { + "enableAnalyzersSupport": true + } +}