From 335754353855184d93614be0fba4c351199d311f Mon Sep 17 00:00:00 2001 From: Lord Jabu Jabu Date: Sun, 19 Jan 2025 05:30:46 -0700 Subject: [PATCH] Dev Feature - Create VS Code Build tasks and update build documentation (#4895) * Added vs code build tasks * Fix typo in BUILDING.md regarding CMake Tools plugin * Add "Build All" task to VS Code configuration --- .gitignore | 5 ++-- .vscode/tasks.json | 61 ++++++++++++++++++++++++++++++++++++++++++++++ docs/BUILDING.md | 4 +-- 3 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 9c499abb0..ec5401c38 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,9 @@ __pycache__/ .DS_Store # Text editor remnants -.vscode/ +.vscode/* +!.vscode/tasks.json + .vs/ .idea/ cmake-build-** @@ -400,7 +402,6 @@ ASALocalRun/ lib/libgfxd/libgfxd.a ExporterTest/ExporterTest.a ZAPDUtils/ZAPDUtils.a -.vscode/ build/ external/ ZAPDUtils/build/ diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..be763065e --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,61 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Setup CMake Project", + "type": "shell", + "command": "cmake", + "args": [ + "-S", + ".", + "-B", + "build/x64", + "-G", + "Visual Studio 17 2022", + "-T", + "v143", + "-A", + "x64" + ], + "group": "build", + "problemMatcher": [] + }, + { + "label": "Generate SOH OTR", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "./build/x64", + "--target", + "GenerateSohOtr" + ], + "group": "build", + "problemMatcher": [] + }, + { + "label": "Build Project", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "./build/x64" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "dependsOn": ["Generate SOH OTR"], + "problemMatcher": [] + }, + { + "label": "Build All", + "dependsOrder": "sequence", + "dependsOn": [ + "Setup CMake Project", + "Generate SOH OTR", + "Build Project" + ] + } + ] +} \ No newline at end of file diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 963037465..4e37a27e9 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -58,7 +58,7 @@ To develop using Visual Studio you only need to use cmake to generate the soluti To develop using Visual Studio Code or another editor you only need to open the repository in it. To build you'll need to follow the instructions from the building section. -_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ +_Note: If you're using Visual Studio Code, the [CMake Tools plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ _Experimental: You can also use another build system entirely rather than MSVC like [Ninja](https://ninja-build.org/) for possibly better performance._ @@ -177,7 +177,7 @@ Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake, tinyxml2, **Important: For maximum performance make sure you have ninja build tools installed!** -_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ +_Note: If you're using Visual Studio Code, the [CMake Tools plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ ```bash # Clone the repo