Repository navigation
[Feature] VS Code integration for IntelliSense, build tasks, and F5 debugging (#7) #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
135b7e4
#7: Add VS Code IntelliSense build and debug setup
oltir06 a5ae385
#7: Stabilize script builds with cached FetchContent deps
oltir06 b09b1e5
Merge branch 'dev' into feature/7-vscode-integration
oltir06 ad4d3f3
#7: Fix VS Code intellisense paths and add CodeLLDB debug support
oltir06 9ac5bc6
#7 Rename folder & Update README
oltir06 e65f160
#7 Rename sub directories from ressources, shaders, fonts to lowercase
oltir06 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| { | ||
| "version": 4, | ||
| "configurations": [ | ||
| { | ||
| "name": "Win32", | ||
| "intelliSenseMode": "windows-msvc-x64", | ||
| "compilerPath": "cl.exe", | ||
| "cStandard": "c17", | ||
| "cppStandard": "c++17", | ||
| "compileCommands": "${workspaceFolder}/build/compile_commands.json", | ||
| "includePath": [ | ||
| "${workspaceFolder}/src/**", | ||
| "${workspaceFolder}/src/engine/**", | ||
| "${workspaceFolder}/src/editor/**", | ||
| "${workspaceFolder}/src/math/**", | ||
| "${workspaceFolder}/src/utils/**", | ||
| "${workspaceFolder}/vendor/**", | ||
| "${workspaceFolder}/build/_deps/**/include", | ||
| "${workspaceFolder}/build/_deps/imgui-src", | ||
| "${workspaceFolder}/build/_deps/imgui-src/backends" | ||
| ], | ||
| "browse": { | ||
| "path": [ | ||
| "${workspaceFolder}/src", | ||
| "${workspaceFolder}/src/engine", | ||
| "${workspaceFolder}/src/editor", | ||
| "${workspaceFolder}/src/math", | ||
| "${workspaceFolder}/src/utils", | ||
| "${workspaceFolder}/vendor" | ||
| ], | ||
| "limitSymbolsToIncludedHeaders": true | ||
| }, | ||
| "configurationProvider": "ms-vscode.cmake-tools" | ||
| }, | ||
| { | ||
| "name": "Linux", | ||
| "intelliSenseMode": "linux-gcc-x64", | ||
|
MomdAli marked this conversation as resolved.
|
||
| "compilerPath": "/usr/bin/clang++", | ||
| "cStandard": "c17", | ||
| "cppStandard": "c++17", | ||
| "compileCommands": "${workspaceFolder}/build/compile_commands.json", | ||
| "includePath": [ | ||
| "${workspaceFolder}/src/**", | ||
| "${workspaceFolder}/src/engine/**", | ||
| "${workspaceFolder}/src/editor/**", | ||
| "${workspaceFolder}/src/math/**", | ||
| "${workspaceFolder}/src/utils/**", | ||
| "${workspaceFolder}/vendor/**", | ||
| "${workspaceFolder}/build/_deps/**/include", | ||
| "${workspaceFolder}/build/_deps/imgui-src", | ||
| "${workspaceFolder}/build/_deps/imgui-src/backends" | ||
| ], | ||
| "browse": { | ||
| "path": [ | ||
| "${workspaceFolder}/src", | ||
| "${workspaceFolder}/src/engine", | ||
| "${workspaceFolder}/src/editor", | ||
| "${workspaceFolder}/src/math", | ||
| "${workspaceFolder}/src/utils", | ||
| "${workspaceFolder}/vendor" | ||
| ], | ||
| "limitSymbolsToIncludedHeaders": true | ||
| }, | ||
| "configurationProvider": "ms-vscode.cmake-tools" | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "recommendations": [ | ||
| "ms-vscode.cmake-tools", | ||
| "ms-vscode.cpptools", | ||
| "vadimcn.vscode-lldb", | ||
| "esbenp.prettier-vscode" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "version": "0.0.1", | ||
| "configurations": [ | ||
| { | ||
| "name": "Voltray (Windows CodeLLDB)", | ||
| "type": "lldb", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/build/Debug/Voltray.exe", | ||
| "cwd": "${workspaceFolder}/build/Debug", | ||
| "preLaunchTask": "Build Voltray (Debug)" | ||
| }, | ||
| { | ||
| "name": "Voltray (Windows Debug MSVC)", | ||
| "type": "cppvsdbg", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/build/Debug/Voltray.exe", | ||
| "cwd": "${workspaceFolder}/build/Debug", | ||
| "preLaunchTask": "Build Voltray (Debug)", | ||
| "stopAtEntry": false, | ||
| "console": "integratedTerminal" | ||
| }, | ||
| { | ||
| "name": "Voltray (Linux/macOS Debug)", | ||
| "type": "cppdbg", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/build/Voltray", | ||
| "cwd": "${workspaceFolder}/build", | ||
| "preLaunchTask": "Build Voltray (Debug)", | ||
| "stopAtEntry": false, | ||
| "externalConsole": false, | ||
| "MIMode": "gdb", | ||
| "linux": { | ||
| "MIMode": "gdb" | ||
| }, | ||
| "osx": { | ||
| "MIMode": "lldb" | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Build Voltray (Debug)", | ||
| "type": "shell", | ||
| "command": "bash", | ||
| "args": [ | ||
| "${workspaceFolder}/scripts/build.sh", | ||
| "Debug" | ||
| ], | ||
| "windows": { | ||
| "command": "cmd", | ||
| "args": [ | ||
| "/c", | ||
| "${workspaceFolder}\\scripts\\build.bat", | ||
| "Debug" | ||
| ] | ||
| }, | ||
| "problemMatcher": [], | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| }, | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared", | ||
| "clear": true | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,36 @@ | ||
| @echo off | ||
| setlocal | ||
|
|
||
| REM === CONFIG === | ||
| set BUILD_TYPE=Release | ||
| set GENERATOR="Visual Studio 17 2022" | ||
| set BUILD_DIR=build | ||
| set BUILD_DOC=voltray-docs | ||
|
|
||
| REM === GENERATE PROJECT FILES === | ||
| echo Configuring project with CMake... | ||
| cmake -B %BUILD_DIR% -G %GENERATOR% -A x64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% | ||
| set BUILD_TYPE=%~1 | ||
| if "%BUILD_TYPE%"=="" set BUILD_TYPE=Debug | ||
|
|
||
| set SCRIPT_DIR=%~dp0 | ||
| for %%I in ("%SCRIPT_DIR%..") do set REPO_ROOT=%%~fI | ||
| set BUILD_DIR=%REPO_ROOT%\build | ||
| set GENERATOR=Visual Studio 17 2022 | ||
| set FETCHCONTENT_FLAG=-DFETCHCONTENT_UPDATES_DISCONNECTED=ON | ||
|
|
||
| if exist "%BUILD_DIR%\_deps\glfw-src" ( | ||
| if exist "%BUILD_DIR%\_deps\assimp-src" ( | ||
| if exist "%BUILD_DIR%\_deps\imgui-src" ( | ||
| set FETCHCONTENT_FLAG=-DFETCHCONTENT_FULLY_DISCONNECTED=ON | ||
| ) | ||
| ) | ||
| ) | ||
|
|
||
| echo Configuring Voltray %BUILD_TYPE%... | ||
| cmake -S "%REPO_ROOT%" -B "%BUILD_DIR%" -G "%GENERATOR%" -A x64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_EXPORT_COMPILE_COMMANDS=ON %FETCHCONTENT_FLAG% | ||
| if errorlevel 1 ( | ||
| echo Failed to configure the project. | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| REM === BUILD PROJECT === | ||
| echo Building project... | ||
| cmake --build %BUILD_DIR% --config %BUILD_TYPE% | ||
|
|
||
| echo Building Voltray %BUILD_TYPE%... | ||
| cmake --build "%BUILD_DIR%" --config %BUILD_TYPE% | ||
| if errorlevel 1 ( | ||
| echo Build failed. | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| echo Build successful! | ||
|
|
||
|
|
||
| echo Generating documentation... | ||
| cmake --build %BUILD_DIR% --target doc --config %BUILD_TYPE% | ||
|
|
||
| REM === RUN THE ENGINE === | ||
| set EXE_PATH=%BUILD_DIR%\%BUILD_TYPE%\Voltray.exe | ||
| set EXE_DIR=%BUILD_DIR%\%BUILD_TYPE% | ||
|
|
||
| if exist "%EXE_PATH%" ( | ||
| echo Running Voltray... | ||
| pushd "%EXE_DIR%" | ||
| Voltray.exe | ||
| popd | ||
| ) else ( | ||
| echo Error: Voltray.exe not found at %EXE_PATH% | ||
| ) | ||
|
|
||
| endlocal | ||
| pause | ||
| echo Build successful. | ||
| endlocal |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.