readme mods. can build with glfw in either Debug or Release config. some reorg of the cpp example

This commit is contained in:
2025-09-15 11:53:24 -05:00
parent 6d45d12dc1
commit cb6d239d00
7 changed files with 12 additions and 8 deletions

View File

@@ -18,15 +18,17 @@ Download the DLL from the latest release on the [releases page](https://git.the-
## Build from source (not recommended)
Building is a tad messy atm. I despise Visual Studio and like to manage my own build process. I prefer something simple like a script to build and that's currently what I have, but it's not nearly as clean as I'd like. I hope to fix this mess in the future.
I despise Visual Studio and like to manage my own build process. I prefer something simple like a script to build and that's currently what I have.
1. You'll need git bash and an installation of MSVC (likely via downloading/installing Visual Studio and then installing the C++ build tools).
2. Get the source code. `git clone --recurse-submodules https://git.the-embedded-lab.com/shamilton/LivePlotter.git`
3. Build the glfw library. `cd ext/glfw`. `mkdir build && cd build && cmake ..`. Open GLFW.sln and build the solution.
4. Find `vcvars64.bat` in your installation and modify the path in [run_before_build.bat](./run_before_build.bat) to point to it.
5. Open git bash to the root directory of the project.
6. Run `./run_before_build.bat` then `build.sh`
3. Build the glfw library. `cd ext/glfw`. `mkdir build && cd build && cmake ..`. Open GLFW.sln, Change the configuration to "Release, and build the solution.
4. Find `vcvars64.bat` in your installation and modify the path in [activate.bat](./activate.bat) to point to it.
5. Open cmd.exe to the root directory of the project
6. Run `activate`. Then `build release`.
7. A folder bin/ should exist with `LivePlotter.dll` inside.
8. Copy the entire contents of the bin folder (preferably minus the intermediate build files... sorry) to your project's build output directory
8. Copy the entire contents of the bin folder to your project's build output directory
If issues arise, please feel free to create an issue on this repository.
See the csharp and cpp [example projects](./examples) for details on how to integrate the DLL with your codebase. You must have the project built to run the csharp project (it copies the contents of bin into its output directory).

View File

@@ -1,10 +1,12 @@
@ECHO off
SET flags=-Od -ZI -MDd
SET config=Debug
IF "%1" == "release" (
SET flags=-O2 -MTd
SET flags=-O2 -MD -LD
SET config=Release
)
SET srcs=src\*
mkdir bin obj
cl %srcs% ext\glfw\build\src\Debug\glfw3.lib kernel32.lib user32.lib Gdi32.lib Shell32.lib -I inc -I ext\glm -I ext\glfw\include %flags% -std:c++20 -MP -LD -Fo:obj\\ -Fe:bin\\LivePlotter.dll
cl %srcs% ext\glfw\build\src\%config%\glfw3.lib kernel32.lib user32.lib Gdi32.lib Shell32.lib -I inc -I ext\glm -I ext\glfw\include %flags% -std:c++20 -MP -Fo:obj\\ -Fe:bin\\LivePlotter.dll
COPY /Y assets\* bin
COPY /Y assets\shaders\* bin