Skip to content

Commit 8014aa0

Browse files
committed
add info about builld system
1 parent 40e5f3b commit 8014aa0

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

UI/.vscode/c_cpp_properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"${workspaceFolder}/**"
77
],
88
"defines": [],
9-
"compilerPath": "C:/Program Files/mingw64/bin/g++.exe",
9+
"compilerPath": "g++",
1010
"cStandard": "c17",
1111
"cppStandard": "c++20",
1212
"intelliSenseMode": "windows-gcc-x64"

UI/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Building the UI
2+
3+
Just want the latest .exe? - go to https://github.com/activecontrols/astra-software/actions/workflows/ui_build.yml
4+
5+
## Setting up gcc on Windows
6+
7+
Follow the instructions here, including updating PATH: https://code.visualstudio.com/docs/cpp/config-mingw
8+
9+
mingw provides the infrastructure needed to install and run linux tools natively on windows. (Note: as opposed to WSL, which isn't useful here because we are building a windows executable).
10+
11+
After restarting VS Code, `gcc`, `gdb`, and `g++` should work from the VS Code terminal.
12+
13+
## Building
14+
15+
At this point, running `mingw32-make` in the UI folder should build the project.
16+
The relative path to each .cpp file is needed for the build are specified in the makefile. This structure is re-created in the build folder.
17+
So `imgui/backends/imgui_impl_dx11.cpp` gets compiled to `build/imgui/backends/imgui_impl_dx11.o`. **Any new source files must be added to the makefile.**
18+
19+
Note: the makefile only detects changes in `.cpp` files. If you change a `.h` file, the `.cpp` files that rely on it **will not be rebuilt unless you also modify them.** If needed, just run `mingw32-make clean` to clear out all build artifacts so that all files will be rebuilt with the next time `make` is called.
20+
21+
## Intellisense
22+
23+
Intellisense should "just work" once you have mingw installed (along with https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) and you have the `UI` folder open in VSCode (not the outer folder that has ASTRA embedded code). If it doesn't, make sure that you can run `g++` from the command line. If something isn't working, look at [c_cpp_properties.json](.vscode/c_cpp_properties.json) and the intellisense status in the bottom right of the VSCode window.

0 commit comments

Comments
 (0)