From 2d38f74371ac96363a73b35205cd9917afabd963 Mon Sep 17 00:00:00 2001 From: Seth Hamilton Date: Tue, 9 Sep 2025 09:44:15 -0500 Subject: [PATCH] saving alternate build method. About to go back to regular visual studio build, but may pursue this approach in the future --- LivePlotter.sln | 51 ----- LivePlotter.vcxproj | 259 ------------------------ LivePlotter.vcxproj.filters | 60 ------ LivePlotter.vcxproj.user | 9 - Test.vcxproj | 156 -------------- Test.vcxproj.filters | 30 --- Test.vcxproj.user | 11 - bin/LivePlotter.exp | Bin 0 -> 1420 bytes bin/LivePlotter.lib | 3 + build.sh | 17 ++ compile_commands.json | 56 +---- export_compdb.sh | 5 + ext/glfw | 2 +- inc/logger.hpp | 10 - inc/sync.hpp | 8 +- run_before_build.bat | 1 + src/{ => demo}/demo.cpp | 10 +- src/logger.cpp | 11 - src/{ => plotter}/body.cpp | 0 src/{ => plotter}/camera.cpp | 0 src/{ => plotter}/glad.c | 0 src/{ => plotter}/live_plotter.cpp | 0 src/{ => plotter}/shaders.cpp | 0 src/{ => plotter}/shaders/fragment.glsl | 0 src/{ => plotter}/shaders/vertex.glsl | 0 src/{ => plotter}/util.cpp | 0 26 files changed, 40 insertions(+), 659 deletions(-) delete mode 100644 LivePlotter.sln delete mode 100644 LivePlotter.vcxproj delete mode 100644 LivePlotter.vcxproj.filters delete mode 100644 LivePlotter.vcxproj.user delete mode 100644 Test.vcxproj delete mode 100644 Test.vcxproj.filters delete mode 100644 Test.vcxproj.user create mode 100644 bin/LivePlotter.exp create mode 100644 bin/LivePlotter.lib create mode 100644 build.sh create mode 100644 export_compdb.sh delete mode 100644 inc/logger.hpp create mode 100644 run_before_build.bat rename src/{ => demo}/demo.cpp (92%) delete mode 100644 src/logger.cpp rename src/{ => plotter}/body.cpp (100%) rename src/{ => plotter}/camera.cpp (100%) rename src/{ => plotter}/glad.c (100%) rename src/{ => plotter}/live_plotter.cpp (100%) rename src/{ => plotter}/shaders.cpp (100%) rename src/{ => plotter}/shaders/fragment.glsl (100%) rename src/{ => plotter}/shaders/vertex.glsl (100%) rename src/{ => plotter}/util.cpp (100%) diff --git a/LivePlotter.sln b/LivePlotter.sln deleted file mode 100644 index 172bb1e..0000000 --- a/LivePlotter.sln +++ /dev/null @@ -1,51 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35707.178 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LivePlotter", "LivePlotter.vcxproj", "{74C0F84F-216F-4A12-9F91-6AFC83CF9257}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcxproj", "{1873E9A4-995B-4327-98CA-2524EE2D8030}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - DLLDebug|x64 = DLLDebug|x64 - DLLDebug|x86 = DLLDebug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Debug|x64.ActiveCfg = Debug|x64 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Debug|x64.Build.0 = Debug|x64 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Debug|x86.ActiveCfg = Debug|Win32 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Debug|x86.Build.0 = Debug|Win32 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.DLLDebug|x64.ActiveCfg = DebugDLL|x64 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.DLLDebug|x64.Build.0 = DebugDLL|x64 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.DLLDebug|x86.ActiveCfg = DebugDLL|Win32 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.DLLDebug|x86.Build.0 = DebugDLL|Win32 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Release|x64.ActiveCfg = Release|x64 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Release|x64.Build.0 = Release|x64 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Release|x86.ActiveCfg = Release|Win32 - {74C0F84F-216F-4A12-9F91-6AFC83CF9257}.Release|x86.Build.0 = Release|Win32 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Debug|x64.ActiveCfg = Debug|x64 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Debug|x64.Build.0 = Debug|x64 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Debug|x86.ActiveCfg = Debug|Win32 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Debug|x86.Build.0 = Debug|Win32 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.DLLDebug|x64.ActiveCfg = Debug|x64 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.DLLDebug|x64.Build.0 = Debug|x64 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.DLLDebug|x86.ActiveCfg = Debug|Win32 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.DLLDebug|x86.Build.0 = Debug|Win32 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Release|x64.ActiveCfg = Release|x64 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Release|x64.Build.0 = Release|x64 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Release|x86.ActiveCfg = Release|Win32 - {1873E9A4-995B-4327-98CA-2524EE2D8030}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C971CF76-7BA3-45CC-A602-A49CCD685470} - EndGlobalSection -EndGlobal diff --git a/LivePlotter.vcxproj b/LivePlotter.vcxproj deleted file mode 100644 index b40c75b..0000000 --- a/LivePlotter.vcxproj +++ /dev/null @@ -1,259 +0,0 @@ - - - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 17.0 - Win32Proj - {74c0f84f-216f-4a12-9f91-6afc83cf9257} - LivePlotter - 10.0 - - - - Application - true - v143 - Unicode - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - $(ProjectDir)ext\glfw\build\src\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - $(ProjectDir)ext\glm;$(ProjectDir)ext\glfw\include;$(ProjectDir)inc;$(IncludePath) - $(ProjectDir)bin\$(Platform)\$(Configuration)\ - $(ProjectDir)obj\$(Platform)\$(Configuration)\ - $(ProjectDir)src;$(SourcePath) - - - $(ProjectDir)ext\glfw\build\src\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - $(ProjectDir)ext\glm;$(ProjectDir)ext\glfw\include;$(ProjectDir)inc;$(IncludePath) - $(ProjectDir)bin\$(Platform)\$(Configuration)\ - $(ProjectDir)obj\$(Platform)\$(Configuration)\ - $(ProjectDir)src;$(SourcePath) - - xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)" - - - xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" - - - xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)" - - - - $(ProjectDir)bin\$(Platform)\$(Configuration)\ - $(ProjectDir)obj\$(Platform)\$(Configuration)\ - $(ProjectDir)ext\glfw\build\src\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - $(ProjectDir)ext\glm;$(ProjectDir)ext\glfw\include;$(ProjectDir)inc;$(IncludePath) - $(ProjectDir)src;$(SourcePath) - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp20 - - - Console - true - glfw3.lib;opengl32.lib;%(AdditionalDependencies) - - - xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)" - - - xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" - - - xcopy /y "$(ProjectDir)assets\Icosphere.obj" "$(OutDir)" && xcopy /y "$(ProjectDir)assets\poses.csv" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)" - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp20 - - - Console - true - glfw3.lib;opengl32.lib;%(AdditionalDependencies) - - - xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)" - - - xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" - - - xcopy /y "$(ProjectDir)assets\Icosphere.obj" "$(OutDir)" && xcopy /y "$(ProjectDir)assets\poses.csv" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)" - - - - - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp20 - - - Console - true - true - true - - - xcopy /y "$(ProjectDir)assets\Icosphere.obj" "$(OutDir)" && xcopy /y "$(ProjectDir)assets\poses.csv" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)" - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/LivePlotter.vcxproj.filters b/LivePlotter.vcxproj.filters deleted file mode 100644 index d71a56f..0000000 --- a/LivePlotter.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/LivePlotter.vcxproj.user b/LivePlotter.vcxproj.user deleted file mode 100644 index 0eec2e4..0000000 --- a/LivePlotter.vcxproj.user +++ /dev/null @@ -1,9 +0,0 @@ - - - - WindowsLocalDebugger - - - WindowsLocalDebugger - - \ No newline at end of file diff --git a/Test.vcxproj b/Test.vcxproj deleted file mode 100644 index 0a27a9e..0000000 --- a/Test.vcxproj +++ /dev/null @@ -1,156 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - {74c0f84f-216f-4a12-9f91-6afc83cf9257} - true - - - - - - - 17.0 - Win32Proj - {1873e9a4-995b-4327-98ca-2524ee2d8030} - Test - 10.0 - Demo - - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - - - - - - - - - - - - - - - - - - - $(ProjectDir)bin\$(Platform)\$(Configuration)\ - $(ProjectDir)obj\$(Platform)\$(Configuration)\ - $(ProjectDir)ext\glm;$(ProjectDir)inc;$(VC_IncludePath);$(WindowsSDK_IncludePath); - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\lib\x64;$(ProjectDir)bin\$(PlatformShortName)\$(Configuration);($(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - - - $(ProjectDir)bin\$(Platform)\$(Configuration)\ - $(ProjectDir)obj\$(Platform)\$(Configuration)\ - $(ProjectDir)ext\glm;$(ProjectDir)inc;$(VC_IncludePath);$(WindowsSDK_IncludePath); - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\lib\x64;$(ProjectDir)bin\$(PlatformShortName)\$(Configuration);($(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp20 - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp20 - - - Console - true - - - - - - \ No newline at end of file diff --git a/Test.vcxproj.filters b/Test.vcxproj.filters deleted file mode 100644 index 01fd40c..0000000 --- a/Test.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/Test.vcxproj.user b/Test.vcxproj.user deleted file mode 100644 index a5ee18c..0000000 --- a/Test.vcxproj.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - $(OutDir) - WindowsLocalDebugger - - - $(OutDir) - WindowsLocalDebugger - - \ No newline at end of file diff --git a/bin/LivePlotter.exp b/bin/LivePlotter.exp new file mode 100644 index 0000000000000000000000000000000000000000..d455879af4c012bd7d365888dde2f5dc0a79c7fc GIT binary patch literal 1420 zcmYdkV`BLK|NsAq%nS??3=p7~nvz(O2w{WBTMP^gDGUq@c8nk%1A_!%-mEkr#Lw=CzYYNB(bQ3p|~W!fT6S?1)-6Lfq{XAfq{XUL56{WffdYBU|?Wi z1G7{Z7#P^WEDZ(*1_3b31L|*P1|0?l20^fx4+8@OCzxfxz`!5`W(6=XFmQocCJYP= z!eCYi0|Ns$m}S8Li3Mhc2nGfQkSmxOY#10AM8UE#3=9msV3q>|1A`ctmB7Hjzz1fz zFfcHPgISU#m~UNz`&5915Lz;VG5dvF~dSM5fg^hXd8ivLGfDLqyb}JP-vD0c9-^4}_VZnH compile_commands.json +find src -iname "*.cpp" -exec sh -c 'echo { \"directory\": \"$(cygpath -m $(pwd))\", \"command\": \"cl "$(cygpath -m {})" -I inc -I ext/glm -I ../ext/glfw/include -Od -std:c++20 -Fo\", \"file\": \"$(cygpath -m {})\" }, >> compile_commands.json' \; +echo ] >> compile_commands.json diff --git a/ext/glfw b/ext/glfw index 63a7e8b..8e15281 160000 --- a/ext/glfw +++ b/ext/glfw @@ -1 +1 @@ -Subproject commit 63a7e8b7f82497b0459acba5c1ce7f39aa2bc0e8 +Subproject commit 8e15281d34a8b9ee9271ccce38177a3d812456f8 diff --git a/inc/logger.hpp b/inc/logger.hpp deleted file mode 100644 index 8682944..0000000 --- a/inc/logger.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include - -void log(const char* msg); -void log(std::string msg); -void log(char*, int len); -void flush(const char* filepath); -void start_auto_flush_thread(const char* filepath, double period); -void start_auto_flush_thread(); diff --git a/inc/sync.hpp b/inc/sync.hpp index aa4b9b1..49c8125 100644 --- a/inc/sync.hpp +++ b/inc/sync.hpp @@ -135,25 +135,25 @@ void dispose(Semaphore &s) { TimeSpan from_ms(double milliseconds) { TimeSpan ts; - ts.QuadPart = static_cast(milliseconds/1000.0)*freq.QuadPart; + ts.QuadPart = static_cast(milliseconds/1000.0)*freq.QuadPart; return ts; } TimeSpan from_s(double seconds) { TimeSpan ts; - ts.QuadPart = static_cast(seconds)*freq.QuadPart; + ts.QuadPart = static_cast(seconds)*freq.QuadPart; return ts; } TimeSpan from_min(double minutes) { TimeSpan ts; - ts.QuadPart = static_cast(minutes*60.0)*freq.QuadPart; + ts.QuadPart = static_cast(minutes*60.0)*freq.QuadPart; return ts; } TimeSpan from_hours(double hours) { TimeSpan ts; - ts.QuadPart = static_cast(hours*60.0*60.0)*freq.QuadPart; + ts.QuadPart = static_cast(hours*60.0*60.0)*freq.QuadPart; return ts; } diff --git a/run_before_build.bat b/run_before_build.bat new file mode 100644 index 0000000..8a4e494 --- /dev/null +++ b/run_before_build.bat @@ -0,0 +1 @@ +"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && bash diff --git a/src/demo.cpp b/src/demo/demo.cpp similarity index 92% rename from src/demo.cpp rename to src/demo/demo.cpp index 9d1a806..6b4a03f 100644 --- a/src/demo.cpp +++ b/src/demo/demo.cpp @@ -1,15 +1,7 @@ -#include #include #include -#include -#include -#include -#include -#include -#include -#include - +#include "glm/ext/vector_float3.hpp" #include "util.hpp" #include "live_plotter.hpp" diff --git a/src/logger.cpp b/src/logger.cpp deleted file mode 100644 index 1065e90..0000000 --- a/src/logger.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "sync.hpp" -#include "logger.hpp" - -static Mutex m; -static Thread t; - -static std::vector backlog; - -void log(const char* msg) { - -} diff --git a/src/body.cpp b/src/plotter/body.cpp similarity index 100% rename from src/body.cpp rename to src/plotter/body.cpp diff --git a/src/camera.cpp b/src/plotter/camera.cpp similarity index 100% rename from src/camera.cpp rename to src/plotter/camera.cpp diff --git a/src/glad.c b/src/plotter/glad.c similarity index 100% rename from src/glad.c rename to src/plotter/glad.c diff --git a/src/live_plotter.cpp b/src/plotter/live_plotter.cpp similarity index 100% rename from src/live_plotter.cpp rename to src/plotter/live_plotter.cpp diff --git a/src/shaders.cpp b/src/plotter/shaders.cpp similarity index 100% rename from src/shaders.cpp rename to src/plotter/shaders.cpp diff --git a/src/shaders/fragment.glsl b/src/plotter/shaders/fragment.glsl similarity index 100% rename from src/shaders/fragment.glsl rename to src/plotter/shaders/fragment.glsl diff --git a/src/shaders/vertex.glsl b/src/plotter/shaders/vertex.glsl similarity index 100% rename from src/shaders/vertex.glsl rename to src/plotter/shaders/vertex.glsl diff --git a/src/util.cpp b/src/plotter/util.cpp similarity index 100% rename from src/util.cpp rename to src/plotter/util.cpp